From 924ec30e7075ea7a9dbac569a537d876f9146850 Mon Sep 17 00:00:00 2001 From: Silas Schöffel Date: Thu, 4 Apr 2024 17:06:23 +0200 Subject: refactor: move users/sils dir to hm --- hm/swayidle/default.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 hm/swayidle/default.nix (limited to 'hm/swayidle') diff --git a/hm/swayidle/default.nix b/hm/swayidle/default.nix new file mode 100644 index 0000000..32befa2 --- /dev/null +++ b/hm/swayidle/default.nix @@ -0,0 +1,28 @@ +{pkgs, ...}: { + services.swayidle = { + enable = true; + events = [ + # TODO: Find a way to close keepassxc-database on lock + #{ + # event = "lock"; + # command = ""; + #} + { + event = "before-sleep"; + command = "${pkgs.swaylock}/bin/swaylock -f"; + } + ]; + timeouts = [ + { + timeout = 160; + command = "${pkgs.swaylock}/bin/swaylock -f"; + } + #{ + # timeout = 40; + # command = "${pkgs.hyprland}/bin/hyprctl dispatch dpms off"; + # resumeCommand = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on"; + #} + ]; + systemdTarget = "hyprland-session.target"; + }; +} -- cgit 1.4.1