aboutsummaryrefslogtreecommitdiff
path: root/wallpaper-picker.sh
diff options
context:
space:
mode:
authorMikkel Thestrup <mikkel@mithe.dk>2026-01-25 15:38:58 +0100
committerMikkel Thestrup <mikkel@mithe.dk>2026-01-27 22:56:12 +0100
commit35536c401016c0ac69c164a65d2c31b74992a808 (patch)
tree5e956602dd23b5ab32dc3cb311be151dfdd10ba4 /wallpaper-picker.sh
downloadscripts-35536c401016c0ac69c164a65d2c31b74992a808.tar.gz
scripts-35536c401016c0ac69c164a65d2c31b74992a808.zip
Initial commit
Diffstat (limited to '')
-rwxr-xr-xwallpaper-picker.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/wallpaper-picker.sh b/wallpaper-picker.sh
new file mode 100755
index 0000000..7b26563
--- /dev/null
+++ b/wallpaper-picker.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+# Program for picking wallpaper using Dmenu.
+
+FOLDER="$HOME/pictures/wallpaper"
+
+menu() {
+ CHOICE=$(ls "$FOLDER" | dmenu -l 15 -i -p "Wallpaper: ")
+
+ case "$CHOICE" in
+ *.*)
+ wallpaper "$FOLDER/$CHOICE"
+ ;;
+ *)
+ exit 0
+ ;;
+
+ esac
+}
+
+case "$#" in
+ 0)
+ menu
+ ;;
+ 1)
+ wallpaper "$1"
+ ;;
+ *)
+ exit 0
+ ;;
+esac