#!/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 2
set -U img $argv[1]

wallust run $img; and begin
	niri msg action do-screen-transition 
	swww img $img
	makoctl reload
	notify-send -i $img "Wallust" "Changed wallpaper and palette."
end;

