aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel <[email protected]>2024-07-20 13:31:29 -0400
committerDaniel <[email protected]>2024-07-20 13:31:29 -0400
commitb439cc59e3f029cbf9d574b4fc02d766815a25ad (patch)
treea6adb16a8fa3dcfab90130a63ce895a48d133cf7 /bin
parent48312114028b1f1f61694cbc51d189372ad94229 (diff)
new settings and repaint feature
Diffstat (limited to 'bin')
-rwxr-xr-xbin/.local/bin/scripts/wallpaper.sh14
1 files changed, 12 insertions, 2 deletions
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."