diff --git a/home/wm/addon/default.nix b/home/wm/addon/default.nix index 7d29324..e0829cc 100644 --- a/home/wm/addon/default.nix +++ b/home/wm/addon/default.nix @@ -6,5 +6,6 @@ ./kanshi.nix ./swayidle.nix ./swaylock.nix + ./swww.nix ]; } diff --git a/home/wm/addon/swww.nix b/home/wm/addon/swww.nix new file mode 100644 index 0000000..113e08c --- /dev/null +++ b/home/wm/addon/swww.nix @@ -0,0 +1,15 @@ +{ pkgs, ... }: { + systemd.user.services.swww-daemon = { + Unit = { + Description = "Solution for Wayland Wallpaper Woes"; + Documentation = "https://github.com/LGFae/swww"; + PartOf = [ "graphical-session.target" ]; + After = [ "graphical-session-pre.target" ]; + }; + Service = { + ExecStart = "${pkgs.swww}/bin/swww-daemon"; + Restart = "on-failure"; + KillMode = "mixed"; + }; + }; +} diff --git a/packages/scripts/chpaper.sh b/packages/scripts/chpaper.sh index 75c5df2..242cb40 100755 --- a/packages/scripts/chpaper.sh +++ b/packages/scripts/chpaper.sh @@ -16,6 +16,5 @@ random_paper() { fi } -swww query || swww init convert "$(random_paper)" /tmp/wallpaper.jpg && swww img --transition-step 2 --transition-type random --transition-duration 1 "/tmp/wallpaper.jpg"