From: sev Date: Mon, 8 Jun 2020 07:52:23 +0000 (-0500) Subject: update urxvtd detection, new script `wall' X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/commitdiff_plain/19d577d35f5802e1f12e03676202fde0e9902df3?ds=inline update urxvtd detection, new script `wall' TERMINAL checks for urxvtd will now use `which' for portability. `wall' script added that pulls from Mysplash API for random backgrounds updated .xinitrc to use wall --- diff --git a/base/.xinitrc b/base/.xinitrc index 97c5c14..8862d13 100644 --- a/base/.xinitrc +++ b/base/.xinitrc @@ -21,7 +21,7 @@ fi # redshift, root image redon & -"$HOME/.fehbg" +wall & # Xorg settings xset r rate 290 26 & @@ -50,7 +50,7 @@ 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 diff --git a/bin/wall b/bin/wall new file mode 100755 index 0000000..ffd0628 --- /dev/null +++ b/bin/wall @@ -0,0 +1,10 @@ +#!/bin/sh +wall="$HOME/var/tmp/wall.jpg" +res=$(xdpyinfo) +if [ $? -eq 0 ]; then + res=$(echo "$res" | awk '/dimensions:/{print $2}') +else + echo "ERROR: $res" + exit 1 +fi +wget -O "$wall" "https://source.unsplash.com/$res/?tunnel,architecture" && feh --no-fehbg --bg-fill "$wall"