~kris/dots

srice

ref: e9b48d06a8541f3eda5c4db90382ab3c77183afb srice/.local/bin/media/bg-picker -rwxr-xr-x 441 bytes
e9b48d06 — Kris Yotam xprofile: systemd-aware pipewire start + blueman-applet; sb-internet: tolerate missing /proc/net/wireless 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

# bg-picker - wallpaper picker using ThumbPick
# Opens ThumbPick with vim keybinds to browse wallpapers.
# On selection, runs setbg to apply the chosen wallpaper.

WALLPAPER_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/wallpapers"

[ -d "$WALLPAPER_DIR" ] || { notify-send "bg-picker" "No wallpapers directory found at $WALLPAPER_DIR"; exit 1; }

chosen="$(thumbpick "$WALLPAPER_DIR" -v)" || exit 1

[ -n "$chosen" ] && setbg "$chosen"