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