]> git.sev.monster Git - dotfiles.git/blame - base/.xinitrc
.zshrc changes
[dotfiles.git] / base / .xinitrc
CommitLineData
1b8a4102 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
12f46d4e 21# redshift, root image
1b8a4102 22redon &
118fb6e0 23"$HOME/.fehbg"
24
25# Xorg settings
26xset r rate 290 26 &
27xset m 1/1 0 &
12f46d4e 28xset s off
29xset dpms 0 0 600
118fb6e0 30
31# root terminal
2a766e92 32urxvt -name TermBg1 -override-redirect -geometry x5+0--1 \
7f359c8a 33 -e tail -F /var/log/messages &
2a766e92 34xdotool search --limit 1 --sync --classname TermBg1 windowsize -usehints 100% 6
118fb6e0 35
36# tray icons
37#"$HOME/src/phwmon/phwmon.py" --mem --mem_percent --net --io --bg \#0000 &
38volumeicon &
39
40# daemons
1b8a4102 41dunst &
1b8a4102 42xautolock -time 10 -locker "$HOME/bin/l" &
43xbanish &
ee4bf66d 44eval `ssh-agent`
1b8a4102 45
46if [ -x /usr/local/bin/urxvtd ]; then
47 for i in 1 2; do
12f46d4e 48 # try to start client twice, once before checking for daemon
49 # and another after trying to start it
ee4bf66d 50 urxvtc -e exit
1b8a4102 51 if [ $? -eq 2 ]; then
52 # daemon not started, attempt to start once
53 if [ $i -eq 1 ]; then
54 urxvtd -q -o -f
55 fi
56 else
57 TERMINAL=/usr/local/bin/urxvtc
58 export TERMINAL
59 break
60 fi
61 done
62 unset i
63fi
64
118fb6e0 65# try to wait for session to start
66(sleep 0.1 && tint2) &
1390d028 67#x220t
12f46d4e 68(sleep 0.1 && [ -x "$HOME/bin/acpi_ac" ] && \
69 "$HOME/bin/acpi_ac" "0x0`sysctl -n hw.acpi.acline`") &
118fb6e0 70(sleep 1.5 && [ -x /usr/local/bin/conky ] && conky -c "$HOME/.conkyrc.d/dock") &
71
ee4bf66d 72# load any global scripts
1b8a4102 73if [ -d /usr/local/etc/X11/xinit/xinitrc.d ]; then
74 for f in /usr/local/etc/X11/xinit/xinitrc.d/?*.sh; do
75 [ -x "$f" ] && . "$f"
76 done
77 unset f
78fi
79
12f46d4e 80# start session
1b8a4102 81if [ ! -n "$1" ]; then
82 session=i3
83else
84 session=$1
ee4bf66d 85 shift
1b8a4102 86fi
ee4bf66d 87exec $session "$@"
118fb6e0 88
89# cleanup
12f46d4e 90#TODO: trap this
118fb6e0 91ssh-agent -k
This page took 0.058929 seconds and 4 git commands to generate.