aboutsummaryrefslogtreecommitdiffstats
path: root/_xinitrc
blob: 018562ea8e1d7d71f2d7ea269ab77cee11514acc (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#
# ~/.xinitrc
#
# Credits:
# [1] ArchWiki - xinitrc
#     https://wiki.archlinux.org/index.php/xinitrc
#
# Aaron LI
# 2016-01-31
#

# source system xinit scripts
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
    for f in /etc/X11/xinit/xinitrc.d/?* ; do
        [ -x "$f" ] && . "$f"
    done
    unset f
fi

# load X resources (do not fork to the background)
[ -e ~/.Xresources ] && xrdb -load ~/.Xresources

# disable beep
xset b off

# disable CapsLock
setxkbmap -option ctrl:nocaps

# gpg-agent
pgrep -x gpg-agent || eval $(gpg-agent --daemon)

# start X session
session=${1:-openbox}
case "${session}" in
    xfce|xfce4)
        exec dbus-launch --exit-with-session startxfce4;;
    openbox)
        exec dbus-launch --exit-with-session openbox-session;;
    *)
        echo "ERROR: unknown session" >/dev/stderr
        ;;
esac

# vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=sh: #