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

38 lines
1.1 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
# set session below, or in console run: startx ~/.xinitrc SESSION
2018-04-19 01:43:29 -05:00
# session to run if none passed as first arg ($1)
2018-08-19 22:21:13 -05:00
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
2018-08-19 22:19:41 -05:00
WM="${session%-session}"
export WM="${WM#start}"
# 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
# do NOT put commands below the exec lines
case $session in
2018-08-26 02:23:53 -05:00
dwm) exec dwm ;;
2018-08-20 04:39:25 -05:00
bsp|bspwm) exec bspwm ;;
2018-08-26 02:23:53 -05:00
i3|i3wm|i3-gaps) exec i3 ;;
gnome|gnome-session) exec gnome-session ;;
2018-08-20 04:39:25 -05:00
xfce|xfce4|startxfce4) exec startxfce4 ;;
openbox|openbox-session) exec openbox-session ;;
cinnamon|cinnamon-session) exec cinnamon-session ;;
*) exec "$session" # Unknown, try running it
esac