Skip to content

Commit

Permalink
Merge pull request #467 from JaKooLit/revert-461-PersonalChange
Browse files Browse the repository at this point in the history
Revert "feat: change dark light wallpaper to its opposite wallpaper"
  • Loading branch information
JaKooLit authored Oct 3, 2024
2 parents 812d997 + 14b07b4 commit c939d73
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions config/hypr/scripts/DarkLight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c939d73

Please sign in to comment.