Move hyprpaper to be a systemd user service instead

This commit is contained in:
Evie Litherland-Smith 2024-02-20 19:38:38 +00:00
parent 59b9fac674
commit d97303e7d1

View file

@ -68,6 +68,19 @@
preload = ${config.stylix.image} preload = ${config.stylix.image}
wallpaper = ,${config.stylix.image} wallpaper = ,${config.stylix.image}
''; '';
systemd.user.services.hyprpaper = {
Unit = {
Description = "Hyprland wallpaper utility";
Wants = ["hyprland-session.target"];
After = ["hyprland-session.target"];
};
Service = {
Environment = ["PATH=/run/current-system/sw/bin/:$PATH"];
Restart = "always";
ExecStart = "${pkgs.hyprpaper}/bin/hyprpaper";
};
Install.WantedBy = ["default.target"];
};
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
xwayland.enable = true; xwayland.enable = true;
@ -91,7 +104,6 @@
exec-once = with config; [ exec-once = with config; [
"${wayland.windowManager.hyprland.finalPackage}/bin/hyprctl setcursor ${gtk.theme.name} ${toString gtk.cursorTheme.size}" "${wayland.windowManager.hyprland.finalPackage}/bin/hyprctl setcursor ${gtk.theme.name} ${toString gtk.cursorTheme.size}"
"${pkgs.swaynotificationcenter}/bin/swaync" "${pkgs.swaynotificationcenter}/bin/swaync"
"${pkgs.hyprpaper}/bin/hyprpaper"
"${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1" "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"
"${pkgs.protonmail-bridge}/bin/protonmail-bridge -n" "${pkgs.protonmail-bridge}/bin/protonmail-bridge -n"
]; ];