mirror of
https://github.com/Andrey0189/nixos-config-reborn.git
synced 2025-09-15 10:06:00 +03:00
add hypridle
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
imports = [
|
||||
./binds.nix
|
||||
./hyprlock.nix
|
||||
./hypridle.nix
|
||||
./main.nix
|
||||
];
|
||||
}
|
||||
|
34
home-manager/modules/hyprland/hypridle.nix
Normal file
34
home-manager/modules/hyprland/hypridle.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
ignore_dbus_inhibit = false;
|
||||
lock_cmd = "pidof hyprlock || hyprlock";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 180;
|
||||
on-timeout = "brightnessctl -s set 30";
|
||||
on-resume = "brightnessctl -r";
|
||||
}
|
||||
{
|
||||
timeout = 300;
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
{
|
||||
timeout = 600;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
{
|
||||
timeout = 1200;
|
||||
on-timeout = "sysemctl suspend";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user