aboutsummaryrefslogtreecommitdiff
path: root/scripts/set_background
diff options
context:
space:
mode:
authormirenn <me@mirenn.dev>2025-12-02 08:54:27 +0100
committermirenn <me@mirenn.dev>2026-03-20 10:24:05 +0100
commitc71d4a46983880a94d8c4e53dbbc99ebd9325381 (patch)
tree96f908c8eccf11d19d77c37c333ed56aa4a437d5 /scripts/set_background
parent6afc74f542553c7cd439d943e916d6aaef3e71d3 (diff)
downloaddotfiles-c71d4a46983880a94d8c4e53dbbc99ebd9325381.tar.gz
dotfiles-c71d4a46983880a94d8c4e53dbbc99ebd9325381.zip
xd
Diffstat (limited to '')
-rwxr-xr-xscripts/set_background19
1 files changed, 8 insertions, 11 deletions
diff --git a/scripts/set_background b/scripts/set_background
index 9a29ffa..be75486 100755
--- a/scripts/set_background
+++ b/scripts/set_background
@@ -1,21 +1,18 @@
#!/usr/bin/fish
-
if test (count $argv) -lt 1; or not test -f $argv[1]
echo "Usage: $(status filename) <img>"
exit 1
end
-set -x SWWW_TRANSITION "any"
-set -x SWWW_TRANSITION_FPS 60
-set -x SWWW_TRANSITION_DURATION 1.5
-
-niri msg action do-screen-transition
-wallust run $argv[1]; and begin
- set -U img $argv[1]
- swww img $argv[1]
+wallust run $argv[1] -Ts; and begin
+ set -U IMG $argv[1]
+ echo "IMG=$IMG" > ~/.config/scripts/IMG.env
+ niri msg action do-screen-transition
+ wallust -q run $IMG
+ systemctl --user restart swaybg.service
makoctl reload
- notify-send -i $img "Wallust" "Changed wallpaper and palette."
+ notify-send -i $IMG "Wallust" "Changed wallpaper and palette."
end; or begin
- notify-send -u critical "Wallust" "Failed to change palette"
+ notify-send -i $argv[1] -u critical "Wallust" "Failed to change palette"
end;