function swww_set_wallpaper set wallpaper $argv[1] # Start swww daemon if not running if not pgrep swww-daemon > /dev/null swww-daemon & sleep 1 end # Set wallpaper with animation swww img "$wallpaper" \ --transition-type wipe end