X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/blobdiff_plain/f4a5f0037d058d20a339f1a00f8ac8200cd27a19..dd4c892b92f1dd0d11e35b5e0861ea5901de16f3:/base/.xinitrc diff --git a/base/.xinitrc b/base/.xinitrc index 97c5c14..30db18b 100644 --- a/base/.xinitrc +++ b/base/.xinitrc @@ -1,39 +1,23 @@ #!/bin/zsh # using zsh to load .zshenv (eg. for PATH) but file is sh-compatible -sysmodmap=/usr/local/etc/X11/xinit/.Xmodmap -sysresources=/usr/local/etc/X11/xinit/.Xresources -usermodmap=~/.Xmodmap -userresources=~/.Xresources - -if [ -f $sysresources ]; then - xrdb -merge $sysresources -fi -if [ -f $sysmodmap ]; then - xmodmap $sysmodmap -fi -if [ -f "$userresources" ]; then - xrdb -merge "$userresources" -fi -if [ -f "$usermodmap" ]; then - xmodmap "$usermodmap" -fi - -# redshift, root image -redon & -"$HOME/.fehbg" - # 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" -type d -mindepth 1 -maxdepth 2 | while read -r x; do +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 & @@ -48,13 +32,12 @@ dunst & mpc-notify -d & xautolock -time 10 -locker "$HOME/bin/lck" & xbanish & -eval `ssh-agent` -if [ -z "$TERMINAL" -a \( -x /usr/bin/urxvtd -o -x /usr/local/bin/urxvtd \) ]; then +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 2>/dev/null + urxvtc -e exit >/dev/null 2>&1 if [ $? -eq 2 ]; then # daemon not started, attempt to start once if [ $i -eq 1 ]; then @@ -72,21 +55,15 @@ if [ -z "$TERMINAL" -a \( -x /usr/bin/urxvtd -o -x /usr/local/bin/urxvtd \) ]; t unset i fi -# try to wait for session to start +# 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`") & -# load any global scripts -if [ -d /usr/local/etc/X11/xinit/xinitrc.d ]; then - for f in /usr/local/etc/X11/xinit/xinitrc.d/?*.sh; do - [ -x "$f" ] && . "$f" - done - unset f -fi - # start session if [ -z "$1" ]; then session=i3 @@ -95,7 +72,3 @@ else shift fi exec $session "$@" - -# cleanup -#TODO: trap this -ssh-agent -k