-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathdwm-run
executable file
·52 lines (43 loc) · 1.56 KB
/
dwm-run
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
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
test -f $sysresources && xrdb -merge $sysresources
test -f $sysmodmap && xmodmap $sysmodmap
test -f "$userresources" && xrdb -merge "$userresources"
# lightdm auto applies the usermodmap, this avoids doing that twice
test -z $(pgrep lightdm | head -n 1) && test -f "$usermodmap" && xmodmap "$usermodmap"
# start some nice programs
eval $(ssh-agent)
test $(command -v xsetroot) && xsetroot -solid midnightblue &
test $(command -v gpg-agent) && eval $(gpg-agent --daemon)
if [ $(command -v xbanish) ]; then
xbanish >>$HOME/.xbanish.log & # https://github.com/jcs/xbanish
elif [ $(command -v unclutter) ]; then
unclutter &
fi
# source machine- and uname-specific xinitrcs
xinitcfg="$HOME/.config/xinit"
test -f "$xinitcfg/u/$(uname)" && . "$xinitcfg/u/$(uname)"
test -f "$xinitcfg/host/$(hostname)" && . "$xinitcfg/host/$(hostname)"
/usr/local/bin/dwm 2>>.dwm_log &
# exit X when dwmstatus (or failsafe xterm) is killed
if [ $(command -v slstatus) ]; then
slstatus
elif [ $(command -v dwmstatus) ]; then
dwmstatus
elif [ $(command -v st) ]; then
st
elif [ $(command -v urxvt) ]; then
urxvt
elif [ $(command -v uxterm) ]; then
uxterm -ls -T Failsafe -geometry 80x24-0-0
elif [ $(command -v rxvt) ]; then
rxvt
elif [ $(command -v xterm) ]; then
xterm -ls -T Failsafe -geometry 80x24-0-0
elif [ $(command -v gnome-terminal) ]; then
gnome-terminal
fi