This repository has been archived on 2024-09-01. You can view files and clone it, but cannot push or open issues or pull requests.
al-skel/home/.xinitrc

47 lines
984 B
Bash
Executable File

#!/bin/sh
# Executed by startx
# By calling this with arguments we can start different sessions
# eg. startx ~/.xinitrc i3 or startx ~/.xinitrc bspwm
# simply using startx, openbox is set as the default
session=${1:-openbox}
export WM="$session"
if [ -f /etc/X11/xinit/.Xmodmap ]; then
xmodmap /etc/X11/xinit/.Xmodmap
fi
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*.sh; do
[ -x "$f" ] && . "$f"
done
fi
if [ -f ~/.Xresources ]; then
xrdb -load ~/.Xresources
fi
if [ -f ~/.Xmodmap ]; then
xmodmap ~/.Xmodmap
fi
if [ -f ~/.xprofile ]; then
. ~/.xprofile
fi
gnome-keyring-daemon --start --components=pkcs11 &
lxpolkit &
kbdrate -d 400 -r 50
xset r rate 400 50
xset s 3600 3600
# start the session
case $session in
i3|i3wm) exec i3 ;;
bsp|bspwm) exec bspwm ;;
awesome) exec awesome ;;
xfce|xfce4) exec startxfce4 ;;
openbox|openbox-session) exec openbox-session ;;
*) exec "$1"
esac