Waybar here i come (#58)

This commit is contained in:
Hadi
2026-08-13 13:55:30 +02:00
committed by GitHub
parent f1f22de7b7
commit 0cef4320fd
137 changed files with 3488 additions and 2941 deletions
+31
View File
@@ -0,0 +1,31 @@
# hypridle handles idle management: lock the screen, turn the display off, and
# suspend after periods of inactivity. The `caffeine-toggle` script pauses it.
{pkgs, ...}: {
services.hypridle = {
enable = true;
settings = {
general = {
# Avoid starting multiple hyprlock instances.
lock_cmd = "${pkgs.procps}/bin/pidof ${pkgs.hyprlock}/bin/hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on";
};
listener = [
{
timeout = 300; # 5 min → lock
on-timeout = "loginctl lock-session";
}
{
timeout = 360; # 6 min → screen off
on-timeout = "${pkgs.hyprland}/bin/hyprctl dispatch dpms off";
on-resume = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on";
}
{
timeout = 1800; # 30 min → suspend
on-timeout = "systemctl suspend";
}
];
};
};
}