]>
Commit | Line | Data |
---|---|---|
dcac60d9 | 1 | #!/bin/zsh |
2 | # using zsh to load .zshenv (eg. for PATH) but file is sh-compatible | |
1b8a4102 | 3 | |
118fb6e0 | 4 | # Xorg settings |
d569f3f7 | 5 | # TODO: create shim for cpp |
6 | xrdb -merge ~/.Xresources | |
7 | xmodmap ~/.Xmodmap | |
118fb6e0 | 8 | xset r rate 290 26 & |
9 | xset m 1/1 0 & | |
12f46d4e | 10 | xset s off |
11 | xset dpms 0 0 600 | |
d569f3f7 | 12 | find -L "${XDG_DATA_HOME:-~/share}/fonts" -mindepth 1 -maxdepth 2 -type d | while read -r x; do |
116467fd | 13 | [ -f "$x/fonts.dir" ] && xset +fp $x |
8720834f | 14 | done |
ff1a2414 | 15 | xset fp rehash |
118fb6e0 | 16 | |
d569f3f7 | 17 | # redshift, root image |
18 | redon & | |
19 | wall & | |
20 | ||
118fb6e0 | 21 | # root terminal |
2a766e92 | 22 | urxvt -name TermBg1 -override-redirect -geometry x5+0--1 \ |
7f359c8a | 23 | -e tail -F /var/log/messages & |
ff1a2414 | 24 | xdotool search --limit 1 --sync --classname TermBg1 windowsize --usehints 100% 6 |
118fb6e0 | 25 | |
26 | # tray icons | |
27 | #"$HOME/src/phwmon/phwmon.py" --mem --mem_percent --net --io --bg \#0000 & | |
28 | volumeicon & | |
29 | ||
30 | # daemons | |
1b8a4102 | 31 | dunst & |
6aaffcd0 | 32 | mpc-notify -d & |
dcac60d9 | 33 | xautolock -time 10 -locker "$HOME/bin/lck" & |
1b8a4102 | 34 | xbanish & |
35 | ||
19d577d3 | 36 | if [ -z "$TERMINAL" -a \( -x $(which -a urxvtd | head -1) \) ]; then |
1b8a4102 | 37 | for i in 1 2; do |
12f46d4e | 38 | # try to start client twice, once before checking for daemon |
39 | # and another after trying to start it | |
d569f3f7 | 40 | urxvtc -e exit >/dev/null 2>&1 |
1b8a4102 | 41 | if [ $? -eq 2 ]; then |
42 | # daemon not started, attempt to start once | |
43 | if [ $i -eq 1 ]; then | |
44 | urxvtd -q -o -f | |
dcac60d9 | 45 | else |
46 | TERMINAL=urxvt | |
47 | export TERMINAL | |
1b8a4102 | 48 | fi |
49 | else | |
dcac60d9 | 50 | TERMINAL=urxvtc |
1b8a4102 | 51 | export TERMINAL |
52 | break | |
53 | fi | |
54 | done | |
55 | unset i | |
56 | fi | |
57 | ||
d569f3f7 | 58 | # taskbar |
59 | # sleep to wait for session to start fully | |
dcac60d9 | 60 | (sleep 0.1 && tint2) & |
d569f3f7 | 61 | |
dcac60d9 | 62 | # x220t |
63 | # TODO: check hostname to load auxillary things | |
64 | # TODO: reformat for linux | |
65 | #(sleep 0.1 "$HOME/bin/acpi_ac" "0x0`sysctl -n hw.acpi.acline`") & | |
118fb6e0 | 66 | |
12f46d4e | 67 | # start session |
dcac60d9 | 68 | if [ -z "$1" ]; then |
1b8a4102 | 69 | session=i3 |
70 | else | |
71 | session=$1 | |
ee4bf66d | 72 | shift |
1b8a4102 | 73 | fi |
ee4bf66d | 74 | exec $session "$@" |