summaryrefslogtreecommitdiff
path: root/home/desktops/hyprland/idle.nix
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-09-17 22:07:16 -0400
committerFreya Murphy <freya@freyacat.org>2025-09-17 22:07:16 -0400
commit68d03fe362b7e0df11662d8d6a1e01eac0bfae77 (patch)
treea76abd05f662f73b4083ddb0d8bf0d72c29e5a74 /home/desktops/hyprland/idle.nix
parentupdate commits (diff)
downloaddotfiles-nix-68d03fe362b7e0df11662d8d6a1e01eac0bfae77.tar.gz
dotfiles-nix-68d03fe362b7e0df11662d8d6a1e01eac0bfae77.tar.bz2
dotfiles-nix-68d03fe362b7e0df11662d8d6a1e01eac0bfae77.zip
refactor: remove modules folder, fully split home and system modules
Diffstat (limited to 'home/desktops/hyprland/idle.nix')
-rw-r--r--home/desktops/hyprland/idle.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/home/desktops/hyprland/idle.nix b/home/desktops/hyprland/idle.nix
new file mode 100644
index 0000000..0a2b951
--- /dev/null
+++ b/home/desktops/hyprland/idle.nix
@@ -0,0 +1,35 @@
+{config, ...}: {
+ services.hypridle = {
+ enable = config.desktops.hyprland.enable;
+ systemdTarget = "hyprland-session.target";
+
+ settings = {
+ general = {
+ lock_cmd = "pidof ${config.default.lockScreen} || ${config.default.lockScreen}";
+ before_sleep_cmd = "loginctl lock-session";
+ after_sleep_cmd = "hyprctl dispatch dpms on";
+ ignore_dbus_inhibit = false;
+ };
+
+ listener = [
+ # dim screen
+ {
+ timeout = 150;
+ on-timeout = "brightnessctl -s set 10";
+ on-resume = "brightnessctl -r";
+ }
+ # lock
+ {
+ timeout = 300;
+ on-timeout = "loginctl lock-session";
+ }
+ # turn off screen
+ {
+ timeout = 350;
+ on-timeout = "hyprctl dispatch dpms off";
+ on-resume = "hyprctl dispatch dpms on";
+ }
+ ];
+ };
+ };
+}