summaryrefslogtreecommitdiff
path: root/local/bin/setwall.sh
diff options
context:
space:
mode:
Diffstat (limited to 'local/bin/setwall.sh')
-rwxr-xr-xlocal/bin/setwall.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/local/bin/setwall.sh b/local/bin/setwall.sh
new file mode 100755
index 0000000..548d281
--- /dev/null
+++ b/local/bin/setwall.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+set -euo pipefail
+WALL_DIR="/home/coast/.local/src/wall"
+SUBDIR=$(find "$WALL_DIR" -mindepth 1 -maxdepth 1 -type d | shuf -n1)
+FILE=$(find "$SUBDIR" -type f \( -iname '*.jpg' -o -iname '*.png' -o -iname '*.jpeg' \) | shuf -n1)
+if [[ -n "$FILE" ]]; then
+ swaymsg output '*' bg "$FILE" fill
+fi