From 5f52a98caa3a15eff093ec4a7d8f093dd411691c Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 27 Apr 2025 09:47:55 +0800 Subject: update(swww): inform wall change to other applications --- swww.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/swww.sh b/swww.sh index 1c1ab47..391d580 100755 --- a/swww.sh +++ b/swww.sh @@ -28,10 +28,18 @@ while true; do # wallust run --backend kmeans --skip-sequences $(cat $XDG_CACHE_HOME/current.bg) & # using cache now swww img $(cat $XDG_CACHE_HOME/current.bg) $swwwarg wallust run --backend full --skip-sequences $(cat $XDG_CACHE_HOME/current.bg) - (sleep 0.1; pgrep -f wallust && wallust run --backend kmeans --skip-sequences $(cat $XDG_CACHE_HOME/current.bg)) & + # (sleep 0.1; pgrep -f wallust && wallust run --backend kmeans --skip-sequences $(cat $XDG_CACHE_HOME/current.bg)) & + + # tell hypr* where is bg + echo "\$bg = $XDG_CACHE_HOME/$(basename "$current_bg").png" > "$XDG_CONFIG_HOME/hypr/bg.conf" + + # reload hyprland + hyprctl reload config-only & swaync-client --reload-css + gdbus call --session --dest com.mitchellh.ghostty --object-path /com/mitchellh/ghostty --method org.gtk.Actions.Activate reload-config [] [] & + current_bg=$(cat $XDG_CACHE_HOME/current.bg) if [[ $current_bg == *.jpg ]]; then magick convert $current_bg $XDG_CACHE_HOME/bg.png & -- cgit v1.2.3