48 lines
1.2 KiB
Bash
Executable File
48 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
# this file is executed when calling startx
|
|
|
|
# to start a different WM, set session below, or in console run:
|
|
# startx ~/.xinitrc WM
|
|
|
|
|
|
# session to run if none passed as first arg ($1)
|
|
session="${1:-openbox-session}"
|
|
|
|
# set environment wm for use in scripts
|
|
WM="${session%-session}"
|
|
WM="${session#start}"
|
|
export WM
|
|
|
|
# default arch xinit scripts
|
|
if [ -d /etc/X11/xinit/xinitrc.d ]; then
|
|
for f in /etc/X11/xinit/xinitrc.d/*.sh; do
|
|
[ -x "$f" ] && . "$f"
|
|
done
|
|
fi
|
|
|
|
# user init scripts and settings
|
|
[ -f /etc/X11/xinit/.Xmodmap ] && xmodmap /etc/X11/xinit/.Xmodmap
|
|
[ -f ~/.Xmodmap ] && xmodmap ~/.Xmodmap
|
|
[ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
|
|
[ -f ~/.xprofile ] && source ~/.xprofile
|
|
|
|
# display timeout and sleep
|
|
xset s 3600 3600
|
|
xset dpms 3600 3700 4000
|
|
|
|
# keyboard repeat rate
|
|
xset r rate 400 50
|
|
kbdrate -d 400 -r 50
|
|
|
|
# do NOT put commands below the exec lines
|
|
case $session in
|
|
i3|i3wm|i3-gaps) exec i3 ;;
|
|
bsp|bspwm) exec bspwm ;;
|
|
xfce|xfce4|startxfce4) exec startxfce4 ;;
|
|
openbox|openbox-session) exec openbox-session ;;
|
|
awesome|awesomewm) exec awesome ;;
|
|
gnome|gnome-session) exec gnome-session ;;
|
|
*) exec "$session" # Unknown, try running it
|
|
esac
|