From 14b07b43fc7b4f1e04816a59ea209f20de9b7d62 Mon Sep 17 00:00:00 2001 From: "Ja.KooLit" <85185940+JaKooLit@users.noreply.github.com> Date: Thu, 3 Oct 2024 23:37:08 +0900 Subject: Revert "feat: change dark light wallpaper to its opposite wallpaper" --- config/hypr/scripts/DarkLight.sh | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh index 3b9afabb..77426902 100755 --- a/config/hypr/scripts/DarkLight.sh +++ b/config/hypr/scripts/DarkLight.sh @@ -110,20 +110,14 @@ else sed -i '/^cursor /s/^cursor .*/cursor #000000/' "${kitty_conf}" fi -#Get current wallpaper name -current_wallpaper=$(swww query | awk -F'/' '{print $NF}' | awk '{print $1}') + + # Set Dynamic Wallpaper for Dark or Light Mode -if [ "$next_mode" = "Dark" ] && [ -f "$light_wallpapers/$current_wallpaper" ]; then - next_wallpaper="$dark_wallpapers/${current_wallpaper/Light/Dark}" -elif [ "$next_mode" = "Light" ] && [ -f "$dark_wallpapers/$current_wallpaper" ]; then - next_wallpaper="$light_wallpapers/${current_wallpaper/Dark/Light}" +if [ "$next_mode" = "Dark" ]; then + next_wallpaper="$(find "${dark_wallpapers}" -type f \( -iname "*.jpg" -o -iname "*.png" \) -print0 | shuf -n1 -z | xargs -0)" else - if [ "$next_mode" = "Dark" ]; then - next_wallpaper="$(find "${dark_wallpapers}" -type f \( -iname "*.jpg" -o -iname "*.png" \) -print0 | shuf -n1 -z | xargs -0)" - else - next_wallpaper="$(find "${light_wallpapers}" -type f \( -iname "*.jpg" -o -iname "*.png" \) -print0 | shuf -n1 -z | xargs -0)" - fi + next_wallpaper="$(find "${light_wallpapers}" -type f \( -iname "*.jpg" -o -iname "*.png" \) -print0 | shuf -n1 -z | xargs -0)" fi # Update wallpaper using swww command -- cgit v1.2.3