]> git.sev.monster Git - dotfiles.git/blame - base/.xinitrc
switch i3bar->tint2, zsh bell, pbuild/run->portpkg
[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
9fddba79 21# root image, redshift
189288f7 22redon &
9fddba79 23"$HOME/.fehbg"
24
25# Xorg settings
26xset r rate 290 26 &
27xset 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 &
35volumeicon &
36
37# daemons
189288f7 38dunst &
189288f7 39xautolock -time 10 -locker "$HOME/bin/l" &
40xbanish &
39bd5e00 41eval `ssh-agent`
189288f7 42
43if [ -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
39bd5e00 47 urxvtc -e exit
189288f7 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
60fi
61
9fddba79 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
39bd5e00 67# load any global scripts
189288f7 68if [ -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
73fi
74
75if [ ! -n "$1" ]; then
76 session=i3
77else
78 session=$1
39bd5e00 79 shift
189288f7 80fi
39bd5e00 81exec $session "$@"
9fddba79 82
83# cleanup
84ssh-agent -k
This page took 0.044394 seconds and 4 git commands to generate.