user/hypridle: init
This commit is contained in:
parent
0fed2f3599
commit
38bcba4756
3 changed files with 44 additions and 0 deletions
|
|
@ -57,6 +57,7 @@ in {
|
|||
./user/eww-wayland.nix
|
||||
./user/git.nix
|
||||
./user/gpg.nix
|
||||
./user/hypridle.nix
|
||||
./user/hyprlock.nix
|
||||
./user/kitty.nix
|
||||
./user/mpv.nix
|
||||
|
|
|
|||
42
modules/user/hypridle.nix
Normal file
42
modules/user/hypridle.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ ... }:
|
||||
let
|
||||
kblight = "light -s sysfs/leds/asus::kbd_backlight";
|
||||
in
|
||||
{
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 120;
|
||||
on-timeout = "${kblight} -O && ${kblight} -S 0";
|
||||
on-resume = "${kblight} -I";
|
||||
}
|
||||
{
|
||||
timeout = 150;
|
||||
on-timeout = "light -O && light -T 0.5";
|
||||
on-resume = "light -I";
|
||||
}
|
||||
{
|
||||
timeout = 180;
|
||||
on-timeout = "light -I && loginctl lock-session";
|
||||
}
|
||||
{
|
||||
timeout = 195;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
{
|
||||
timeout = 600;
|
||||
on-timeout = "systemctl suspend";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -31,6 +31,7 @@
|
|||
theming
|
||||
xdg
|
||||
|
||||
hypridle
|
||||
hyprlock
|
||||
kitty
|
||||
mpv
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue