]>
Commit | Line | Data |
---|---|---|
1b8a4102 | 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 | ||
ee4bf66d | 21 | # session-independent |
1b8a4102 | 22 | xset r rate 290 26 |
23 | xset m 1/1 0 | |
24 | redon & | |
25 | dunst & | |
1b8a4102 | 26 | xautolock -time 10 -locker "$HOME/bin/l" & |
27 | xbanish & | |
ee4bf66d | 28 | eval `ssh-agent` |
1b8a4102 | 29 | |
ee4bf66d | 30 | # run terminal daemon |
1b8a4102 | 31 | if [ -x /usr/local/bin/urxvtd ]; then |
32 | for i in 1 2; do | |
33 | # try to start client twice, once before checking for daemon and | |
34 | # another after trying to start it | |
ee4bf66d | 35 | urxvtc -e exit |
1b8a4102 | 36 | if [ $? -eq 2 ]; then |
37 | # daemon not started, attempt to start once | |
38 | if [ $i -eq 1 ]; then | |
39 | urxvtd -q -o -f | |
40 | fi | |
41 | else | |
42 | TERMINAL=/usr/local/bin/urxvtc | |
43 | export TERMINAL | |
44 | break | |
45 | fi | |
46 | done | |
47 | unset i | |
48 | fi | |
49 | ||
ee4bf66d | 50 | # load any global scripts |
1b8a4102 | 51 | if [ -d /usr/local/etc/X11/xinit/xinitrc.d ]; then |
52 | for f in /usr/local/etc/X11/xinit/xinitrc.d/?*.sh; do | |
53 | [ -x "$f" ] && . "$f" | |
54 | done | |
55 | unset f | |
56 | fi | |
57 | ||
ee4bf66d | 58 | tint2 & |
59 | # sleep for tint to start | |
60 | sleep 3 | |
61 | ||
62 | # try to wait for session to start | |
63 | (sleep 0.2 && [ -x "$HOME/bin/acpi_ac" ] && "$HOME/bin/acpi_ac" "0x0`sysctl -n hw.acpi.acline`") & | |
64 | (sleep 1 && "$HOME/.fehbg") & | |
65 | (sleep 1.5 && [ -x /usr/local/bin/conky ] && conky -c "$HOME/.conkyrc.d/dock") & | |
66 | ||
1b8a4102 | 67 | if [ ! -n "$1" ]; then |
68 | session=i3 | |
69 | else | |
70 | session=$1 | |
ee4bf66d | 71 | shift |
1b8a4102 | 72 | fi |
ee4bf66d | 73 | exec $session "$@" |