about summary refs log tree commit diff
path: root/sh/shufwall
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2023-02-09 16:50:19 -0800
committerXiao Pan <gky44px1999@gmail.com>2023-02-09 16:50:19 -0800
commit6156db64bd38f5d3ba299c77df6268a1afed35f1 (patch)
tree8d1573311895e30a05e0cc9fa5e43763e78f7dd7 /sh/shufwall
init
Diffstat (limited to 'sh/shufwall')
-rwxr-xr-xsh/shufwall9
1 files changed, 9 insertions, 0 deletions
diff --git a/sh/shufwall b/sh/shufwall
new file mode 100755
index 0000000..5b249e1
--- /dev/null
+++ b/sh/shufwall
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ -z "$1" ]; then
+	file=$(find -L "$XDG_PICTURES_DIR/wallpapers" -type f | shuf -n 1)
+else
+	file=$(find -L "$@" -maxdepth 1 -type f | shuf -n 1)
+fi
+
+display -resize "${SCR_WIDTH}x$SCR_HEIGHT" -backdrop -window root "$file"