al-skel/home/.xinitrc

55 lines
1.3 KiB
Plaintext
Raw Normal View History

2017-10-16 14:38:02 -05:00
#!/bin/sh
2018-04-19 01:43:29 -05:00
# this file is executed when calling startx
2018-05-13 17:21:50 -05:00
# To run a different WM, set session="WM" below, or run:
# startx ~/.xinitrc WM
2018-04-19 01:43:29 -05:00
2018-05-08 02:34:04 -05:00
# Session to run if none passed via startx
session=${1:-openbox}
2018-04-19 01:43:29 -05:00
2018-05-08 02:34:04 -05:00
# set environment wm for use in scripts
export WM="$session"
2018-04-19 01:43:29 -05:00
# Default Arch xinit scripts
2017-10-16 14:38:02 -05:00
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*.sh; do
[ -x "$f" ] && . "$f"
done
2017-10-16 14:38:02 -05:00
fi
2018-04-19 01:43:29 -05:00
# user init scripts and settings
2018-05-08 02:34:04 -05:00
[ -f /etc/X11/xinit/.Xmodmap ] && xmodmap /etc/X11/xinit/.Xmodmap
[ -f ~/.Xmodmap ] && xmodmap ~/.Xmodmap
[ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
[ -f ~/.xprofile ] && source ~/.xprofile
2018-04-19 01:43:29 -05:00
2018-05-08 02:34:04 -05:00
# keyring for storing passwords
if hash gnome-keyring &>/dev/null; then
gnome-keyring-daemon --start --components=pkcs11 &
fi
2018-05-08 02:34:04 -05:00
# display timeout and sleep
xset s 3600 3600
xset dpms 3600 3700 4000
2018-04-19 01:43:29 -05:00
# keyboard repeat rate
xset r rate 400 50
2018-05-08 02:34:04 -05:00
kbdrate -d 400 -r 50
2018-04-19 01:43:29 -05:00
2018-05-08 02:34:04 -05:00
# 1/1 mouse acceleration
xset m 1/1
2017-10-16 14:38:02 -05:00
2018-04-19 01:43:29 -05:00
2018-05-08 02:34:04 -05:00
# Do NOT put commands below the exec lines
case $session in
2018-05-08 02:34:04 -05:00
i3|i3wm) exec i3 ;;
bsp|bspwm) exec bspwm ;;
xfce|xfce4) exec startxfce4 ;;
openbox) exec openbox-session ;;
awesome) exec awesome ;;
dwm) exec dwm ;;
*) exec "$1" # Unknown, try running it
esac