]> git.sev.monster Git - dotfiles.git/blob - base/.xinitrc
reorganized tint2, i3->volumeicon vol control
[dotfiles.git] / base / .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 # root image, redshift
22 redon &
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
38 dunst &
39 xautolock -time 10 -locker "$HOME/bin/l" &
40 xbanish &
41 eval `ssh-agent`
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
47                 urxvtc -e exit
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
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
67 # load any global scripts
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
79         shift
80 fi
81 exec $session "$@"
82
83 # cleanup
84 ssh-agent -k
This page took 0.039176 seconds and 4 git commands to generate.