]>
Commit | Line | Data |
---|---|---|
189288f7 | 1 | #!/bin/sh |
2 | ||
3 | sysmodmap=/usr/local/etc/X11/xinit/.Xmodmap | |
4 | sysresources=/usr/local/etc/X11/xinit/.Xresources | |
5 | usermodmap="$HOME/.Xmodmap" | |
6 | userresources="$HOME/.Xresources" | |
7 | ||
8 | if [ -f $sysresources ]; then | |
9 | xrdb -merge $sysresources | |
10 | fi | |
11 | if [ -f $sysmodmap ]; then | |
12 | xmodmap $sysmodmap | |
13 | fi | |
14 | if [ -f "$userresources" ]; then | |
15 | xrdb -merge "$userresources" | |
16 | fi | |
17 | if [ -f "$usermodmap" ]; then | |
18 | xmodmap "$usermodmap" | |
19 | fi | |
20 | ||
9fddba79 | 21 | # root image, redshift |
189288f7 | 22 | redon & |
9fddba79 | 23 | "$HOME/.fehbg" |
24 | ||
25 | # Xorg settings | |
26 | xset r rate 290 26 & | |
27 | xset m 1/1 0 & | |
28 | ||
29 | # root terminal | |
30 | #urxvt -name URxvtRoot -override-redirect -geometry x26+0-0 -e glances & | |
31 | #xdotool search --limit 1 --sync --classname URxvtRoot windowsize 100% y | |
32 | ||
33 | # tray icons | |
34 | #"$HOME/src/phwmon/phwmon.py" --mem --mem_percent --net --io --bg \#0000 & | |
35 | volumeicon & | |
36 | ||
37 | # daemons | |
189288f7 | 38 | dunst & |
189288f7 | 39 | xautolock -time 10 -locker "$HOME/bin/l" & |
40 | xbanish & | |
39bd5e00 | 41 | eval `ssh-agent` |
189288f7 | 42 | |
43 | if [ -x /usr/local/bin/urxvtd ]; then | |
44 | for i in 1 2; do | |
45 | # try to start client twice, once before checking for daemon and | |
46 | # another after trying to start it | |
39bd5e00 | 47 | urxvtc -e exit |
189288f7 | 48 | if [ $? -eq 2 ]; then |
49 | # daemon not started, attempt to start once | |
50 | if [ $i -eq 1 ]; then | |
51 | urxvtd -q -o -f | |
52 | fi | |
53 | else | |
54 | TERMINAL=/usr/local/bin/urxvtc | |
55 | export TERMINAL | |
56 | break | |
57 | fi | |
58 | done | |
59 | unset i | |
60 | fi | |
61 | ||
9fddba79 | 62 | # try to wait for session to start |
63 | (sleep 0.1 && tint2) & | |
64 | (sleep 0.1 && [ -x "$HOME/bin/acpi_ac" ] && "$HOME/bin/acpi_ac" "0x0`sysctl -n hw.acpi.acline`") & | |
65 | (sleep 1.5 && [ -x /usr/local/bin/conky ] && conky -c "$HOME/.conkyrc.d/dock") & | |
66 | ||
39bd5e00 | 67 | # load any global scripts |
189288f7 | 68 | if [ -d /usr/local/etc/X11/xinit/xinitrc.d ]; then |
69 | for f in /usr/local/etc/X11/xinit/xinitrc.d/?*.sh; do | |
70 | [ -x "$f" ] && . "$f" | |
71 | done | |
72 | unset f | |
73 | fi | |
74 | ||
75 | if [ ! -n "$1" ]; then | |
76 | session=i3 | |
77 | else | |
78 | session=$1 | |
39bd5e00 | 79 | shift |
189288f7 | 80 | fi |
39bd5e00 | 81 | exec $session "$@" |
9fddba79 | 82 | |
83 | # cleanup | |
84 | ssh-agent -k |