-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.xinitrc
30 lines (26 loc) · 843 Bytes
/
.xinitrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
# Source the system xinit scripts
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?* ; do
# shellcheck source=/dev/null
[ -x "$f" ] && . "$f"
done
unset f
fi
# Delegate most setting/daemon commands to .xprofile for flexibility around
# using startx or a display manager
# shellcheck disable=SC1091
[ -f /etc/xprofile ] && . /etc/xprofile
# shellcheck disable=SC1090
[ -f ~/.xprofile ] && . ~/.xprofile
# If invoked with startx ~/.xinitrc [some entry or path], launch that.
# If invoked as just startx, run i3
session=${1:-i3}
case $session in
i3 ) exec i3;;
gnome ) exec gnome-shell;;
ff ) exec firefox;;
xmonad ) exec xmonad;;
# No known session, try to run it as command
* ) exec "$1";;
esac