hyprland/noctalia: Use hypridle for idle management

This commit is contained in:
SebastianStork 2026-03-09 18:52:25 +01:00
parent ed5b3adf2d
commit 0b09699cc5
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
4 changed files with 26 additions and 8 deletions

View file

@ -18,8 +18,11 @@
services = {
wpaperd.enable = true;
hypridle.enable = true;
cliphist.enable = true;
hypridle = {
enable = true;
lockCommand = "pidof hyprlock || hyprlock";
};
};
};

View file

@ -14,7 +14,13 @@
noctalia-shell.enable = true;
};
services.cliphist.enable = true;
services = {
cliphist.enable = true;
hypridle = {
enable = true;
lockCommand = "noctalia-shell ipc call lockScreen lock";
};
};
};
home.packages = [ pkgs.grimblast ];
@ -35,8 +41,8 @@
bind = SUPER, V, exec, $ipc launcher clipboard
# Manage session
bindrl = SUPER CONTROL, L, exec, $ipc lockScreen lock
bindrl = SUPER CONTROL, S, exec, $ipc sessionMenu lockAndSuspend
bindrl = SUPER CONTROL, L, exec, loginctl lock-session
bindrl = SUPER CONTROL, S, exec, systemctl sleep
'';
};
}

View file

@ -96,7 +96,7 @@
largeButtonsStyle = false;
countdownDuration = 3000;
};
idle.enabled = true;
idle.enabled = false;
audio.mprisBlacklist = [ "firefox" ];
network.bluetoothAutoConnect = false;
location = {

View file

@ -4,17 +4,26 @@
lib,
...
}:
let
cfg = config.custom.services.hypridle;
in
{
options.custom.services.hypridle.enable = lib.mkEnableOption "";
options.custom.services.hypridle = {
enable = lib.mkEnableOption "";
lockCommand = lib.mkOption {
type = lib.types.nonEmptyStr;
default = "";
};
};
config = lib.mkIf config.custom.services.hypridle.enable {
config = lib.mkIf cfg.enable {
services.hypridle = {
enable = true;
package = pkgs-unstable.hypridle;
settings = {
general = {
lock_cmd = lib.mkIf config.custom.programs.hyprlock.enable "pidof hyprlock || hyprlock";
lock_cmd = cfg.lockCommand;
before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "hyprctl dispatch dpms on";
};