]> git.sev.monster Git - dotfiles.git/blob - .xinitrc
ed72b5e58ba5481c062fb1cca7a539103ad24215
[dotfiles.git] / .xinitrc
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
21 # session-independent
22 xset r rate 290 26
23 xset m 1/1 0
24 redon &
25 dunst &
26 xautolock -time 10 -locker "$HOME/bin/l" &
27 xbanish &
28 eval `ssh-agent`
29
30 # run terminal daemon
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
35                 urxvtc -e exit
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
50 # load any global scripts
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
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
67 if [ ! -n "$1" ]; then
68         session=i3
69 else
70         session=$1
71         shift
72 fi
73 exec $session "$@"
This page took 0.028584 seconds and 2 git commands to generate.