add hypridle

This commit is contained in:
Julian Mutter 2024-06-13 22:24:53 +02:00
parent 60dae66fd1
commit c45d7b19f8

View File

@ -37,9 +37,9 @@ in
home.packages = with pkgs; [ home.packages = with pkgs; [
wofi wofi
xfce.thunar xfce.thunar
# hyprlock # hyprpicker # TODO
# hyprpicker # hyprcursor # TODO
hyprcursor brightnessctl
]; ];
programs.hyprlock.enable = true; programs.hyprlock.enable = true;
@ -75,6 +75,36 @@ in
]; ];
}; };
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock";
};
listener = [
{
timeout = 300; # 5min
on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
on-resume = "brightnessctl -r"; # monitor backlight restore.
}
{
timeout = 360; # 6min
on-timeout = "hyprlock"; # lock screen when timeout has passed
}
{
timeout = 600; # 10min
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
}
];
};
};
programs.waybar = { programs.waybar = {
enable = true; enable = true;
systemd.enable = true; systemd.enable = true;