#!/bin/zsh # using zsh to load .zshenv (eg. for PATH) but file is sh-compatible # Xorg settings # TODO: create shim for cpp xrdb -merge ~/.Xresources xmodmap ~/.Xmodmap xset r rate 290 26 & xset m 1/1 0 & xset s off xset dpms 0 0 600 find -L "${XDG_DATA_HOME:-~/share}/fonts" -mindepth 1 -maxdepth 2 -type d | while read -r x; do [ -f "$x/fonts.dir" ] && xset +fp $x done xset fp rehash # redshift, root image redon & wall & # root terminal urxvt -name TermBg1 -override-redirect -geometry x5+0--1 \ -e tail -F /var/log/messages & xdotool search --limit 1 --sync --classname TermBg1 windowsize --usehints 100% 6 # tray icons #"$HOME/src/phwmon/phwmon.py" --mem --mem_percent --net --io --bg \#0000 & volumeicon & # daemons dunst & mpc-notify -d & xautolock -time 10 -locker "$HOME/bin/lck" & xbanish & if [ -z "$TERMINAL" -a \( -x $(which -a urxvtd | head -1) \) ]; then for i in 1 2; do # try to start client twice, once before checking for daemon # and another after trying to start it urxvtc -e exit >/dev/null 2>&1 if [ $? -eq 2 ]; then # daemon not started, attempt to start once if [ $i -eq 1 ]; then urxvtd -q -o -f else TERMINAL=urxvt export TERMINAL fi else TERMINAL=urxvtc export TERMINAL break fi done unset i fi # taskbar # sleep to wait for session to start fully (sleep 0.1 && tint2) & # x220t # TODO: check hostname to load auxillary things # TODO: reformat for linux #(sleep 0.1 "$HOME/bin/acpi_ac" "0x0`sysctl -n hw.acpi.acline`") & # start session if [ -z "$1" ]; then session=i3 else session=$1 shift fi exec $session "$@"