diff options
Diffstat (limited to 'bin/.local')
| -rwxr-xr-x | bin/.local/bin/scripts/wallpaper.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/.local/bin/scripts/wallpaper.sh b/bin/.local/bin/scripts/wallpaper.sh index 5e77767..ba230b0 100755 --- a/bin/.local/bin/scripts/wallpaper.sh +++ b/bin/.local/bin/scripts/wallpaper.sh @@ -1,13 +1,15 @@ #!/bin/bash -# Clean wallpaper cache file -sed -i '/feh/d' $HOME/.cache/wallpaper # Path to the directory containing your wallpapers WALLPAPER_DIRS="$HOME/Pictures/wallpaper/\n$HOME/Pictures/other-wallpaper/" WALLPAPER_DIR=$(echo -e "$WALLPAPER_DIRS" | dmenu -p "Select directory: ") +if [ -z "$WALLPAPER_DIR" ]; then + exit 1 +fi + # Use nsxiv to mark an image selected_wallpaper=$(nsxiv -t -r -o $WALLPAPER_DIR) @@ -17,6 +19,9 @@ OPTIONS="Tiled\nZoom Filled\nCentered\nMax" # Prompt user to select a display mode selected_mode=$(echo -e "$OPTIONS" | dmenu -p "Select Display Mode:") +# Clean wallpaper cache file +sed -i '/feh/d' $HOME/.cache/wallpaper + # Command to set wallpaper based on selected mode case "$selected_mode" in "Tiled") |
