From b439cc59e3f029cbf9d574b4fc02d766815a25ad Mon Sep 17 00:00:00 2001 From: Daniel <89086143+BardofSprites@users.noreply.github.com> Date: Sat, 20 Jul 2024 13:31:29 -0400 Subject: new settings and repaint feature --- bin/.local/bin/scripts/wallpaper.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'bin/.local') diff --git a/bin/.local/bin/scripts/wallpaper.sh b/bin/.local/bin/scripts/wallpaper.sh index 18e1f42..7f7407d 100755 --- a/bin/.local/bin/scripts/wallpaper.sh +++ b/bin/.local/bin/scripts/wallpaper.sh @@ -1,7 +1,10 @@ #!/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/Anime-Wallpaper/" +WALLPAPER_DIRS="$HOME/Pictures/wallpaper/\n$HOME/Pictures/other-wallpaper/" WALLPAPER_DIR=$(echo -e "$WALLPAPER_DIRS" | dmenu -p "Select directory: ") @@ -9,7 +12,7 @@ WALLPAPER_DIR=$(echo -e "$WALLPAPER_DIRS" | dmenu -p "Select directory: ") selected_wallpaper=$(nsxiv -t -r -o $WALLPAPER_DIR) # Options for display modes -OPTIONS="Tiled\nZoom Filled\nCentered" +OPTIONS="Tiled\nZoom Filled\nCentered\nMax" # Prompt user to select a display mode selected_mode=$(echo -e "$OPTIONS" | dmenu -p "Select Display Mode:") @@ -18,12 +21,19 @@ selected_mode=$(echo -e "$OPTIONS" | dmenu -p "Select Display Mode:") case "$selected_mode" in "Tiled") feh --bg-tile "$selected_wallpaper" + echo "feh --bg-tile '$selected_wallpaper'" >> ~/.cache/wallpaper ;; "Zoom Filled") feh --bg-fill "$selected_wallpaper" + echo "feh --bg-fill '$selected_wallpaper'" >> ~/.cache/wallpaper ;; "Centered") feh --bg-center "$selected_wallpaper" + echo "feh --bg-center '$selected_wallpaper'" >> ~/.cache/wallpaper + ;; + "Max") + feh --bg-max "$selected_wallpaper" + echo "feh --bg-max '$selected_wallpaper'" >> ~/.cache/wallpaper ;; *) echo "Invalid option selected." -- cgit v1.2.3