mirror of
https://github.com/szymon-jozef/amazing-dotfiles.git
synced 2026-09-07 12:10:45 +02:00
34 lines
738 B
Nix
34 lines
738 B
Nix
{ userConfig, lib, ... }:
|
|
|
|
{
|
|
services.hypridle = {
|
|
enable = true;
|
|
package = lib.mkIf (!userConfig.isNixOS) null;
|
|
|
|
settings = {
|
|
general = {
|
|
lock_cmd = "pidof hyprlock || hyprlock";
|
|
before_sleep_cmd = "hyprlock";
|
|
after_sleep_cmd = "hyprctl dispatch dpms on";
|
|
};
|
|
|
|
listener = [
|
|
{
|
|
timeout = 300; # 5 min
|
|
on-timeout = "hyprlock";
|
|
}
|
|
{
|
|
timeout = 330; # 5.5 min
|
|
on-timeout = "hyprctl dispatch dpms off";
|
|
on-resume = "hyprctl dispatch dpms on";
|
|
}
|
|
{
|
|
timeout = 330; # 5.5 min
|
|
on-timeout = "openrgb -c black";
|
|
on-resume = "openrgb -c green";
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|