Replace swayidle with hypridle

This commit is contained in:
Kiana Sheibani 2024-05-13 16:35:33 -04:00
parent 2334582c33
commit b4ae0e7547
2 changed files with 18 additions and 5 deletions

View file

@ -16,6 +16,24 @@ let
}
in {
services.hypridle.enable = true;
services.hypridle.settings = {
general = {
before_sleep_cmd = "swaylock -f";
};
listener = [
{
timeout = 120;
on-timeout = "swaylock -f --grace=180"
}
{
timeout = 600;
on-timeout = "systemctl suspend";
}
];
};
# Idle inhibiting
home.packages = [

View file

@ -5,8 +5,3 @@ swaybg -o '*' -i "$background" -m fill &
# Status Bar
eww open "$platform"_bar --screen 0
# Idle Handler
swayidle timeout 120 'swaylock -f --grace=180' \
timeout 600 'systemctl suspend' \
before-sleep 'swaylock -f' &