summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-04-27 09:47:55 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-04-27 09:47:55 +0800
commit5f52a98caa3a15eff093ec4a7d8f093dd411691c (patch)
treed7240a4e25425d5c745870788efb7eeb1c9ec98c
parent005a7f96b0132da794318a5bf27f0b60903fc59d (diff)
update(swww): inform wall change to other applications
-rwxr-xr-xswww.sh10
1 files changed, 9 insertions, 1 deletions
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 &