diff options
| author | Mikkel Thestrup <mikkel@mithe.dk> | 2026-01-25 15:38:58 +0100 |
|---|---|---|
| committer | Mikkel Thestrup <mikkel@mithe.dk> | 2026-01-27 22:56:12 +0100 |
| commit | 35536c401016c0ac69c164a65d2c31b74992a808 (patch) | |
| tree | 5e956602dd23b5ab32dc3cb311be151dfdd10ba4 /wallpaper-picker.sh | |
| download | scripts-35536c401016c0ac69c164a65d2c31b74992a808.tar.gz scripts-35536c401016c0ac69c164a65d2c31b74992a808.zip | |
Initial commit
Diffstat (limited to '')
| -rwxr-xr-x | wallpaper-picker.sh | 30 |
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 |