41 lines
895 B
Nix
41 lines
895 B
Nix
{ config, lib, ... }:
|
|
|
|
{
|
|
home-manager.users.${config.user} = {
|
|
services.hypridle = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
general = {
|
|
lock_cmd = "pidof hyprlock || hyprlock";
|
|
before_sleep_cmd = "loginctl lock-session";
|
|
after_sleep_cmd = "hyprctl dispatch dpms on";
|
|
ignore_dbus_inhibit = false;
|
|
};
|
|
|
|
listener = [
|
|
# dim screen
|
|
{
|
|
timeout = 150;
|
|
on-timeout = "brightnessctl -s set 10";
|
|
on-resume = "brightnessctl -r";
|
|
}
|
|
# lock
|
|
{
|
|
timeout = 300;
|
|
on-timeout = "loginctl lock-session";
|
|
}
|
|
# turn off screen
|
|
{
|
|
timeout = 350;
|
|
on-timeout = "hyprctl dispatch dpms off";
|
|
on-resume = "hyprctl dispatch dpms on";
|
|
}
|
|
];
|
|
};
|
|
|
|
};
|
|
};
|
|
}
|
|
|