aboutsummaryrefslogtreecommitdiff
path: root/scripts/set_background
blob: be75486bc71a5a1ff1bdaba5e8ac30b58defe1c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/fish
if test (count $argv) -lt 1; or not test -f $argv[1]
  echo "Usage: $(status filename) <img>"
  exit 1
end

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."
end; or begin
	notify-send -i $argv[1] -u critical "Wallust" "Failed to change palette"
end;