Files
nixy/home/system/hypridle/default.nix
Hadi 24d77739b9 UWSM Hyprland
Former-commit-id: 5bfd891d39
2025-04-18 14:09:24 +02:00

30 lines
760 B
Nix

# Hypridle is a daemon that listens for user activity and runs commands when the user is idle.
{ pkgs, lib, ... }: {
services.hypridle = {
enable = true;
settings = {
general = {
ignore_dbus_inhibit = false;
lock_cmd = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "hyprctl dispatch dpms on";
};
listener = [
{
timeout = 600;
on-timeout = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
}
{
timeout = 660;
on-timeout = "systemctl suspend";
}
];
};
};
systemd.user.services.hypridle.Unit.After =
lib.mkForce "graphical-session.target";
}