add(hypr): hyprlock and hypridle

This commit is contained in:
kenji
2025-12-28 17:46:40 -06:00
parent 940fb3ed2e
commit 3b1f775129
6 changed files with 46 additions and 2 deletions
+30
View File
@@ -0,0 +1,30 @@
{ pkgs, ... }:
{
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock";
before_sleep_cmd = "loginctl lock-session"; # lock before suspend
};
listener = [
{
timeout = 300; # 5min
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
}
{
timeout = 330; # 5.5min
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 passed
}
{
timeout = 1800; # 30min
on-timeout = "systemctl suspend"; # suspend pc
}
];
};
};
}
+1 -1
View File
@@ -22,7 +22,7 @@
"sh -c 'sleep 3; hakase-workspace-switch-force 1'" # FIXME: seems like a band-aid
"[workspace 1] uwsm app -- xdg-terminal-exec"
"[workspace 1] ghostty -e bash -c 'fastfetch; exec $SHELL'"
"[workspace special:steam silent] uwsm app -- steam"
];
};
+6
View File
@@ -0,0 +1,6 @@
{ ... }:
{
programs.hyprlock = {
enable = true;
};
}
+1
View File
@@ -19,6 +19,7 @@
];
};
hyprpaper.enable = true;
hyprlock.enable = true;
gtk.enable = true;
};
enable = true;