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