forked from nbirnel/dwm-from-gdm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dwm-run
executable file
·51 lines (42 loc) · 1.4 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
#!/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"
test -f "$usermodmap" && xmodmap "$usermodmap"
# start some nice programs
eval $(ssh-agent)
test $(which xsetroot) && xsetroot -solid midnightblue &
test $(which gpg-agent) && eval $(gpg-agent --daemon)
if [ $(which xbanish) ]; then
xbanish >>$HOME/.xbanish.log & # https://github.com/jcs/xbanish
elif [ $(which 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 [ $(which slstatus) ]; then
slstatus
elif [ $(which dwmstatus) ]; then
dwmstatus
elif [ $(which st) ]; then
st
elif [ $(which urxvt) ]; then
urxvt
elif [ $(which uxterm) ]; then
uxterm -ls -T Failsafe -geometry 80x24-0-0
elif [ $(which rxvt) ]; then
rxvt
elif [ $(which xterm) ]; then
xterm -ls -T Failsafe -geometry 80x24-0-0
elif [ $(which gnome-terminal) ]; then
gmome-terminal
fi