-
Notifications
You must be signed in to change notification settings - Fork 0
/
.xinitrc
71 lines (61 loc) · 1.89 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
60
61
62
63
64
65
66
67
68
69
70
71
# dpi settings
xrandr --dpi 200
# fcitx settings
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
fcitx
# set the cursor
xsetroot -cursor_name left_ptr
# read Xresources
[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources
if [ -s ~/.Xmodmap ]; then
xmodmap ~/.Xmodmap
fi
xbindkeys
autocutsel -fork &
# autocutsel -selection PRIMARY -fork &
# the previous line enables select-to-copy
# xmobar volume pipe
_volume_pipe=/tmp/.volume-pipe
[[ -p $_volume_pipe ]] || mkfifo $_volume_pipe
_mpc_pipe=/tmp/.mpc-pipe
[[ -p $_mpc_pipe ]] || mkfifo $_mpc_pipe
/home/phil/bin/volume.sh &
if [ ! $(pgrep "mpc\.sh") ]; then
/home/phil/bin/mpc.sh loop > /dev/null &
fi
# xmonad is the default environment
session=${1:-xmonad}
# usage:
# $ startx ~/.xinitrc xfce
case $session in
awesome ) exec awesome;;
bspwm ) exec bspwm;;
catwm ) exec catwm;;
cinnamon ) exec cinnamon-session;;
dwm ) exec dwm;;
enlightenment ) exec enlightenment_start;;
ede ) exec startede;;
fluxbox ) exec startfluxbox;;
gnome ) exec gnome-session;;
gnome-classic ) exec gnome-session --session=gnome-classic;;
i3|i3wm ) exec i3;;
icewm ) exec icewm-session;;
jwm ) exec jwm;;
kde ) exec startkde;;
mate ) exec mate-session;;
monster|monsterwm ) exec monsterwm;;
notion ) exec notion;;
openbox ) exec openbox-session;;
unity ) exec unity;;
xfce|xfce4 ) exec startxfce4;;
xmonad )
[[ -f ~/.background.png ]] && feh --bg-fill ~/.background.png &
compton --config ~/.compton.conf &
# for blur and opacity
exec xmonad
;;
# No known session, try to run it as command
*) exec $1;;
esac