]> git.sev.monster Git - dotfiles.git/blob - .xinitrc
f09cc519fa80d3d439a74074cf22c87a83672998
[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 xset r rate 290 26
22 xset m 1/1 0
23 redon &
24 dunst &
25 tint2 &
26 xautolock -time 10 -locker "$HOME/bin/l" &
27 xbanish &
28
29 if [ -x /usr/local/bin/urxvtd ]; then
30         for i in 1 2; do
31                 # try to start client twice, once before checking for daemon and
32                 # another after trying to start it
33                 urxvtc
34                 if [ $? -eq 2 ]; then
35                         # daemon not started, attempt to start once
36                         if [ $i -eq 1 ]; then
37                                 urxvtd -q -o -f
38                         fi
39                 else
40                         TERMINAL=/usr/local/bin/urxvtc
41                         export TERMINAL
42                         break
43                 fi
44         done
45         unset i
46 fi
47
48 # try to wait for session to start, but not critical
49 #XXX: may not be applicable to sessions other than i3
50 (sleep 0.2 && [ -x "$HOME/bin/acpi_ac" ] && "$HOME/bin/acpi_ac" "0x0`sysctl -n hw.acpi.acline`" ) &
51 (sleep 1 && "$HOME/.fehbg") &
52 (sleep 1.5 && [ -x /usr/local/bin/conky ] && conky -c "$HOME/.conkyrc.d/dock" ) &
53
54 if [ -d /usr/local/etc/X11/xinit/xinitrc.d ]; then
55         for f in /usr/local/etc/X11/xinit/xinitrc.d/?*.sh; do
56                 [ -x "$f" ] && . "$f"
57         done
58         unset f
59 fi
60
61 if [ ! -n "$1" ]; then
62         session=i3
63 else
64         session=$1
65 fi
66 exec $session
This page took 0.040323 seconds and 2 git commands to generate.