2016-12-31 01:35:13 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
#
|
|
|
|
# ~/.xsession
|
|
|
|
#
|
2019-04-28 04:05:45 +02:00
|
|
|
# Might be sourced by DM when on custom
|
|
|
|
# TODO Test that on a DM I guess?
|
2016-12-31 01:35:13 +01:00
|
|
|
#
|
|
|
|
|
2019-04-28 04:05:45 +02:00
|
|
|
[ -f ~/.config/Xresources/main ] && xrdb -I"$HOME" ~/.config/Xresources/main
|
|
|
|
xset b off
|
|
|
|
|
|
|
|
found=0
|
|
|
|
tryDM() {
|
|
|
|
if [ $found -eq 0 ]; then
|
|
|
|
parameters=''
|
|
|
|
case $1 in
|
|
|
|
awesome ) executable=awesome;;
|
|
|
|
bspwm ) executable=bspwm;;
|
|
|
|
catwm ) executable=catwm;;
|
|
|
|
cinnamon ) executable=cinnamon-session;;
|
|
|
|
dwm ) executable=dwm;;
|
|
|
|
enlightenment ) executable=enlightenment_start;;
|
|
|
|
ede ) executable=startede;;
|
|
|
|
fluxbox ) executable=startfluxbox;;
|
|
|
|
gnome ) executable=gnome-session;;
|
|
|
|
gnome-classic ) executable=gnome-session; parameters="--session=gnome-classic";;
|
|
|
|
i3|i3wm ) executable=i3;;
|
|
|
|
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 xfce4
|
|
|
|
tryDM mate
|
|
|
|
tryDM gnome
|
|
|
|
tryDM kde
|
2016-12-31 01:35:13 +01:00
|
|
|
|