diff --git a/config/home-manager/programs/hypr/idle.nix b/config/home-manager/programs/hypr/idle.nix index a71e70f..12e7ddb 100644 --- a/config/home-manager/programs/hypr/idle.nix +++ b/config/home-manager/programs/hypr/idle.nix @@ -1,6 +1,8 @@ { inputs, pkgs, + lib, + config, ... }: { services.hypridle = { @@ -33,4 +35,21 @@ ]; }; }; + # needed when using uwsm as the session manager + systemd.user.services."hypridle" = lib.mkForce { + Unit = { + Description = "Hyprland's Idle Daemon"; + After = "graphical-session.target"; + X-Restart-Triggers = ["${config.xdg.configFile."hypr/hypridle.conf".source}"]; + }; + Service = { + Type = "exec"; + ExecStart = lib.getExe pkgs.hypridle; + Restart = "on-failure"; + Slice = "background-graphical.slice"; + }; + Install = { + WantedBy = ["graphical-session.target"]; + }; + }; }