aboutsummaryrefslogtreecommitdiff
path: root/wallpaper-picker.sh
blob: f5440a95c8cde266e5b7ba8b76099e568551282d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
# Pick a wallpaper using dmenu

WALLPAPER_DIR="$HOME/pictures/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

wallpaper "$WALLPAPER_DIR/$choice"