aboutsummaryrefslogtreecommitdiff
path: root/wallpaper-picker.sh
diff options
context:
space:
mode:
authorMikkel Thestrup <mikkel@mithe.dk>2026-02-02 11:17:55 +0100
committerMikkel Thestrup <mikkel@mithe.dk>2026-02-02 11:17:55 +0100
commit9a0e1af9a726b0f3f8c8a4b4d19034180c0d37c7 (patch)
treee449d3067e70330236453db923723439168bf992 /wallpaper-picker.sh
parent1d1fb4182747070d6e6069fe31f9b7f04cd30b4c (diff)
downloadscripts-master.tar.gz
scripts-master.zip
Remove unnecessary case statementHEADmaster
Diffstat (limited to 'wallpaper-picker.sh')
-rwxr-xr-xwallpaper-picker.sh30
1 files changed, 8 insertions, 22 deletions
diff --git a/wallpaper-picker.sh b/wallpaper-picker.sh
index 4a0dbf2..f5440a9 100755
--- a/wallpaper-picker.sh
+++ b/wallpaper-picker.sh
@@ -3,27 +3,13 @@
WALLPAPER_DIR="$HOME/pictures/wallpaper"
-pick_wallpaper() {
- choice=$(find "$WALLPAPER_DIR" \
- -maxdepth 1 \
- -type f \
- -printf '%f\n' \
- 2>/dev/null \
- | dmenu -i -l 5 -p "Wallpaper:")
+choice=$(find "$WALLPAPER_DIR" \
+ -maxdepth 1 \
+ -type f \
+ -printf '%f\n' \
+ 2>/dev/null \
+ | dmenu -i -l 5 -p "Wallpaper:")
- [ -n "$choice" ] || exit 0
+[ -n "$choice" ] || exit 0
- wallpaper "$WALLPAPER_DIR/$choice"
-}
-
-case $# in
- 0)
- pick_wallpaper
- ;;
- 1)
- wallpaper "$1"
- ;;
- *)
- exit 1
- ;;
-esac
+wallpaper "$WALLPAPER_DIR/$choice"