aboutsummaryrefslogtreecommitdiff
path: root/share/provision/debian/files/desktop-basic/home/user/.custom/xsession
blob: 157c4e271c644e9e15353099f0eb1d8e9976603c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#
# Custom X11 session config
#

# Parameters
HOSTNAME="`cat /etc/hostname | cut -d . -f 1`"

# Set window manager
WINDOW_MANAGER="ratpoison"

# Display device
DISPLAY_DEVICE="Virtual-0" # or maybe qlx-0

#
# Set screen size
#

# Modeline determined by running "cvt 1280 780"
#xrandr --newmode "1280x780_60.00"   81.50  1280 1352 1480 1680  780 783 793 810 -hsync +vsync
#xrandr --addmode $DISPLAY_DEVICE 1280x780_60.00

# Modeline determined by running "cvt 1368 748"
#xrandr --newmode "1368x748_60.00"   83.00  1368 1440 1576 1784  748 751 761 777 -hsync +vsync
#xrandr --addmode $DISPLAY_DEVICE 1368x748_60.00

# Set default modeline
#xrandr --output $DISPLAY_DEVICE --mode 1368x748_60.00
#xrandr --output $DISPLAY_DEVICE --mode 1280x780_60.00

# Workaround for programs that depend on a system fully operational
# Example: chromium browser running with firejail when your ${DOWNLOADS}
# path is a shared folder to be mounted by kvmx. If you don't sleep here,
# you mind find a whitelisting error at the firejail profile in your
# ~/.xsession-errors.
sleep 8

# Startup programs
if [ "$HOSTNAME" = "web" ]; then
  PROGRAMS="terminal-session-chooser"
elif [ "$HOSTNAME" = "tor" ]; then
  PROGRAMS="$PROGRAMS tint2 tor-browser"
elif [ "$HOSTNAME" = "vnc" ]; then
  PROGRAMS="$PROGRAMS vnc"
elif [ -e "$HOME/apps/local/startup" ]; then
  PROGRAMS="$PROGRAMS startup"
else
  PROGRAMS="$PROGRAMS terminal"
fi

# Fix keyboard layout if needed
# https://wiki.debian.org/Keyboard
#setxkbmap -model abnt2 -layout br -variant thinkpad

# Local customizations
if [ -e "$HOME/.custom/xsession-$HOSTNAME" ]; then
  . "$HOME/.custom/xsession-$HOSTNAME"
fi