aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-05-17 08:28:15 +0200
committerlonkaars <loek@pipeframe.xyz>2024-05-17 08:28:15 +0200
commit7a08900b60dd2184e2032132a19b5f7727424776 (patch)
tree5c12f9faa2c5f65b95756249762e0dba0be2b5e1
parent6df329d77efc475471083aadc1f342c35f363139 (diff)
remove xrdb dependency from bgcol script
-rwxr-xr-x.local/share/bin/bgcol5
1 files changed, 4 insertions, 1 deletions
diff --git a/.local/share/bin/bgcol b/.local/share/bin/bgcol
index 7176f16..75b89b4 100755
--- a/.local/share/bin/bgcol
+++ b/.local/share/bin/bgcol
@@ -1,6 +1,9 @@
#!/bin/sh
COLOR="$1"
-[ -z "$COLOR" ] && COLOR="$(xrdb -get background)"
+if [ -z "$COLOR" ] ; then
+ . "$XDG_CACHE_HOME/mode/state/theme"
+ COLOR="$bg"
+fi
convert -size 1x1 "xc:$COLOR" /tmp/bgcol.png
feh --no-fehbg --bg-tile /tmp/bgcol.png
rm /tmp/bgcol.png