]> git.sev.monster Git - dotfiles.git/blame - base/.xinitrc
split files to base/ xdg/; fixed vol keys, install
[dotfiles.git] / base / .xinitrc
CommitLineData
189288f7 1#!/bin/sh
2
3sysmodmap=/usr/local/etc/X11/xinit/.Xmodmap
4sysresources=/usr/local/etc/X11/xinit/.Xresources
5usermodmap="$HOME/.Xmodmap"
6userresources="$HOME/.Xresources"
7
8if [ -f $sysresources ]; then
9 xrdb -merge $sysresources
10fi
11if [ -f $sysmodmap ]; then
12 xmodmap $sysmodmap
13fi
14if [ -f "$userresources" ]; then
15 xrdb -merge "$userresources"
16fi
17if [ -f "$usermodmap" ]; then
18 xmodmap "$usermodmap"
19fi
20
39bd5e00 21# session-independent
189288f7 22xset r rate 290 26
23xset m 1/1 0
24redon &
25dunst &
189288f7 26xautolock -time 10 -locker "$HOME/bin/l" &
27xbanish &
39bd5e00 28eval `ssh-agent`
189288f7 29
39bd5e00 30# run terminal daemon
189288f7 31if [ -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
39bd5e00 35 urxvtc -e exit
189288f7 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
48fi
49
39bd5e00 50# load any global scripts
189288f7 51if [ -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
56fi
57
39bd5e00 58tint2 &
59# sleep for tint to start
60sleep 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
189288f7 67if [ ! -n "$1" ]; then
68 session=i3
69else
70 session=$1
39bd5e00 71 shift
189288f7 72fi
39bd5e00 73exec $session "$@"
This page took 0.044345 seconds and 4 git commands to generate.