dotfiles

my active dotfiles
git clone git://git.jakekoroman.com/dotfiles
Log | Files | Refs | README

commit e7cf5775afcd25b7a22204d1295e400dd71e8b88
parent 268ed22e44463523723c428826d40628e1b89953
Author: Jake Koroman <jake@jakekoroman.com>
Date:   Fri,  3 Oct 2025 13:30:08 -0400

scripts/change_wallpaper: add error handling.

Diffstat:
Mscripts/change_wallpaper | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/change_wallpaper b/scripts/change_wallpaper @@ -1,8 +1,12 @@ #!/bin/sh -wallpaper=$(ls ~/pictures/wallpapers/ | dmenu -p "Wallpaper: " -i -l 16) +wallpaper_dir="$HOME/pictures/wallpapers" +wallpaper=$(ls "$wallpaper_dir" | dmenu -p "Wallpaper: " -i -l 16) +[ -z "$wallpaper" ] && exit 1 +[ ! -e "$wallpaper_dir/$wallpaper" ] && exit 1 cd ~/pictures rm -f wallpaper ln -s "wallpapers/$wallpaper" wallpaper xwallpaper --zoom ~/pictures/wallpaper & +cd - > /dev/null