run swww-daemon on graphical.target

This commit is contained in:
Adithya 2024-04-21 22:46:14 +05:30
parent 3dcc6dfdf3
commit 928fa4d2ca
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
3 changed files with 16 additions and 1 deletions

View file

@ -6,5 +6,6 @@
./kanshi.nix
./swayidle.nix
./swaylock.nix
./swww.nix
];
}

15
home/wm/addon/swww.nix Normal file
View file

@ -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";
};
};
}

View file

@ -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"