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