fix(hyprland): use hypridle systemd service instead
This commit is contained in:
parent
9c0b2186ce
commit
a5c4aecba2
3 changed files with 23 additions and 26 deletions
|
|
@ -54,7 +54,6 @@ in
|
|||
]
|
||||
++ [
|
||||
pkgs.hyprlock
|
||||
pkgs.hypridle
|
||||
];
|
||||
|
||||
xdg.configFile."hypr/themes/midnight.conf".text = mkHyprTheme config.palettes.midnight;
|
||||
|
|
@ -111,26 +110,24 @@ in
|
|||
}
|
||||
'';
|
||||
|
||||
xdg.configFile."hypr/hypridle.conf".text = ''
|
||||
general {
|
||||
lock_cmd = ctl wallpaper lock && hyprlock
|
||||
after_sleep_cmd = hyprctl dispatch dpms on
|
||||
}
|
||||
|
||||
# listener {
|
||||
# timeout = 300
|
||||
# on-timeout = ctl wallpaper lock && hyprlock
|
||||
# }
|
||||
|
||||
listener {
|
||||
timeout = 600
|
||||
on-timeout = hyprctl dispatch dpms off
|
||||
on-resume = hyprctl dispatch dpms on
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 1800
|
||||
on-timeout = systemctl suspend
|
||||
}
|
||||
'';
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "ctl wallpaper lock && hyprlock";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
listener = [
|
||||
{
|
||||
timeout = 600;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
{
|
||||
timeout = 1800;
|
||||
on-timeout = "systemctl suspend";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue