From 0c8cbb8216ad142f9d04a6bcff583d3b2bf6c827 Mon Sep 17 00:00:00 2001 From: sev Date: Mon, 8 Jun 2020 02:52:23 -0500 Subject: [PATCH 1/1] 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 --- base/.xinitrc | 4 ++-- bin/wall | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100755 bin/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" -- 2.47.0