~kris/dots

srice

ref: 2dc7c2f7e39f562e3603676ef50c2df0a4723c19 srice/.local/bin/bg-picker -rwxr-xr-x 441 bytes
2dc7c2f7 — Kris Yotam update nvim plan9 theme, add hosts file, misc updates 6 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"