Simplify xinit
This commit is contained in:
@ -2,14 +2,8 @@
|
||||
|
||||
# this file is executed when calling startx
|
||||
|
||||
# set session below, or in console run: startx ~/.xinitrc SESSION
|
||||
|
||||
# session to run if none passed as first arg ($1)
|
||||
session="${1:-openbox}"
|
||||
|
||||
# set environment wm for use in scripts
|
||||
WM="${session%-session}"
|
||||
export WM="${WM#start}"
|
||||
# session to run
|
||||
session="openbox-session"
|
||||
|
||||
# default arch xinit scripts
|
||||
if [ -d /etc/X11/xinit/xinitrc.d ]; then
|
||||
@ -22,16 +16,9 @@ fi
|
||||
[ -f /etc/X11/xinit/.Xmodmap ] && xmodmap /etc/X11/xinit/.Xmodmap
|
||||
[ -f ~/.Xmodmap ] && xmodmap ~/.Xmodmap
|
||||
[ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
|
||||
[ -f ~/.xprofile ] && source ~/.xprofile
|
||||
[ -f ~/.xprofile ] && . ~/.xprofile
|
||||
|
||||
# do NOT put commands below the exec lines
|
||||
case $session in
|
||||
dwm) exec dwm ;;
|
||||
bsp|bspwm) exec bspwm ;;
|
||||
i3|i3wm|i3-gaps) exec i3 ;;
|
||||
gnome|gnome-session) exec gnome-session ;;
|
||||
xfce|xfce4|startxfce4) exec startxfce4 ;;
|
||||
openbox|openbox-session) exec openbox-session ;;
|
||||
cinnamon|cinnamon-session) exec cinnamon-session ;;
|
||||
*) exec "$session" # Unknown, try running it
|
||||
esac
|
||||
# don't put commands below the exec line
|
||||
|
||||
# launch the session
|
||||
exec $session
|
||||
|
Reference in New Issue
Block a user