-
Notifications
You must be signed in to change notification settings - Fork 0
/
.xsession
62 lines (56 loc) · 1.77 KB
/
.xsession
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
58
59
60
61
62
#!/bin/sh
#
# ~/.xsession
#
# import resources
[ -f "$XRESOURCES" ] && xrdb "$XRESOURCES"
[ -f "$XDG_CACHE_HOME/wal/colors.Xresources" ] && xrdb -merge "$XDG_CACHE_HOME/wal/colors.Xresources"
dunst_start &
# disable beep
xset b off
found=0
tryDM() {
if [ $found -eq 0 ]; then
parameters=''
case $1 in
i3|i3wm ) executable=i3;;
bspwm ) executable=bspwm;;
dwm ) executable=dwm;;
awesome ) executable=awesome;;
catwm ) executable=catwm;;
cinnamon ) executable=cinnamon-session;;
enlightenment ) executable=enlightenment_start;;
ede ) executable=startede;;
fluxbox ) executable=startfluxbox;;
gnome ) executable=gnome-session;;
gnome-classic ) executable=gnome-session; parameters="--session=gnome-classic";;
icewm ) executable=icewm-session;;
jwm ) executable=jwm;;
kde ) executable=startkde;;
mate ) executable=mate-session;;
monster|monsterwm ) executable=monsterwm;;
notion ) executable=notion;;
openbox ) executable=openbox-session;;
unity ) executable=unity;;
xfce|xfce4 ) executable=startxfce4;;
xmonad ) executable=xmonad;;
*) executable=$1;;
esac
if command -v "$executable"
then
found=1
exec "$executable" $parameters
fi
fi
}
if [ -n "$1" ]
then
tryDM "$1"
fi
tryDM i3
tryDM bspwm
tryDM dwm
tryDM xfce4
tryDM mate
tryDM gnome
tryDM kde