diff --git a/config/hypr/scripts/PywalSwww.sh b/config/hypr/scripts/PywalSwww.sh index fc7b5d3..d91d3f6 100755 --- a/config/hypr/scripts/PywalSwww.sh +++ b/config/hypr/scripts/PywalSwww.sh @@ -31,8 +31,8 @@ done # Check the flag before executing further commands if [ "$ln_success" = true ]; then # execute pywal - wal -i "$wallpaper_path" + # wal -i "$wallpaper_path" # execute pywal skipping tty and terminal changes - # wal -i "$wallpaper_path" -s -t & + wal -i "$wallpaper_path" -s -t & fi diff --git a/config/hypr/scripts/RefreshNoWaybar.sh b/config/hypr/scripts/RefreshNoWaybar.sh new file mode 100755 index 0000000..f177438 --- /dev/null +++ b/config/hypr/scripts/RefreshNoWaybar.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +# Modified version of Refresh but no waybar refresh +# Used by automatic wallpaper change +# Modified inorder to refresh rofi background, Pywal + +SCRIPTSDIR=$HOME/.config/hypr/scripts + +# Kill already running processes +_ps=(rofi) +for _prs in "${_ps[@]}"; do + if pidof "${_prs}" >/dev/null; then + pkill "${_prs}" + fi +done + +sleep 0.1 +# Relaunch dunst with pywal-borders +${SCRIPTSDIR}/PywalDunst.sh & + +# Pywal refresh +${SCRIPTSDIR}/PywalSwww.sh & + +# Relaunching rainbow borders +sleep 1 +${SCRIPTSDIR}/RainbowBorders.sh & + +# for cava-pywal (note, need to manually restart cava once wallpaper changes) +ln -sf "$HOME/.cache/wal/cava-colors" "$HOME/.config/cava/config" || true \ No newline at end of file diff --git a/config/hypr/scripts/WallpaperRandom.sh b/config/hypr/scripts/WallpaperRandom.sh index b520572..13bd299 100755 --- a/config/hypr/scripts/WallpaperRandom.sh +++ b/config/hypr/scripts/WallpaperRandom.sh @@ -5,8 +5,7 @@ # # NOTE: this script uses bash (not POSIX shell) for the RANDOM variable -pywal_script=$HOME/.config/hypr/scripts/PywalSwww.sh -pywal_refresh=$HOME/.config/hypr/scripts/Refresh.sh +pywal_refresh=$HOME/.config/hypr/scripts/RefreshNoWaybar.sh if [[ $# -lt 1 ]] || [[ ! -d $1 ]]; then echo "Usage: @@ -29,8 +28,7 @@ while true; do | sort -n | cut -d':' -f2- \ | while read -r img; do swww img "$img" - $pywal_script - $pywal_refresh + $pywal_refresh sleep $INTERVAL done