-
Notifications
You must be signed in to change notification settings - Fork 3
/
.xinitrc
59 lines (42 loc) · 1.38 KB
/
.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/sh
exec 2>"$HOME/.cache/xinitrc.log"
FYL_SESSION=${2:-${1:-xmonad}}
# source configuration scripts
for d in /etc/X11/xinit/xinitrc.d \
"${XDG_CONFIG_HOME-${HOME}/.config}/xinitrc.d"; do
[ ! -d "${d}" ] || for f in "${d}/"*; do
[ ! -f "${f}" ] || . "${f}"
done
done
# disable touchpad if mouse is plugged in
touchpad-ctl
# needed for ~/.XCompose to work on GTK (note: it messes up audacity)
GTK_IM_MODULE=xim
XMODIFIERS="@im=none"
export GTK_IM_MODULE XMODIFIERS
case ${FYL_SESSION} in
gnome) exec gnome-session;;
i3) exec i3;;
xfce) exec startxfce4;;
xmonad)
# to configure the wallpaper, use `feh --bg-center` or `feh --bg-fill`,
# which automatically caches the settings in `~/.fehbg`
[ ! -f "${HOME}/.fehbg" ] || "${HOME}/.fehbg"
{
xrdb "${HOME}/.Xresources"
xsetroot -cursor_name left_ptr
xscreensaver -no-splash &
} &
dunst &
xbindkeys &
{ sleep 1; xset dpms; } &
# remove the cached binary if it doesn't appear runnable
# (this happens if the underlying shared libs get upgraded)
"${HOME}/.xmonad/xmonad-x86_64-linux" --version >/dev/null 2>&1 || {
rm -f "${HOME}/.xmonad/xmonad-x86_64-linux"
}
exec xmonad
;;
esac
printf >&2 "%s\n" "$0: invalid session: ${FYL_SESSION}"
exit 1