summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorsils <sils@sils.li>2023-08-14 13:55:27 +0200
committersils <sils@sils.li>2023-08-14 13:55:27 +0200
commitf540f0741882b21e20333beeffecd6c1cb6c3941 (patch)
treefac3f970954ba76785ba1c633e1cb127d3131735
parentFix(u/sils/nixvim): vim-tex is actually called vimtex (diff)
downloadnix-config-f540f0741882b21e20333beeffecd6c1cb6c3941.tar.gz
nix-config-f540f0741882b21e20333beeffecd6c1cb6c3941.zip
Feat(u/sils): Add swayidle
Diffstat (limited to '')
-rw-r--r--users/sils/default.nix1
-rw-r--r--users/sils/swayidle/default.nix16
2 files changed, 17 insertions, 0 deletions
diff --git a/users/sils/default.nix b/users/sils/default.nix
index 8483819..d39d785 100644
--- a/users/sils/default.nix
+++ b/users/sils/default.nix
@@ -12,6 +12,7 @@
     ./packages
     #./river #TODO Update Shell Library
     ./ssh
+    ./swayidle
     ./swaylock
     ./xsession
     #./yambar #TODO Update Shell Library
diff --git a/users/sils/swayidle/default.nix b/users/sils/swayidle/default.nix
new file mode 100644
index 0000000..5d0f96d
--- /dev/null
+++ b/users/sils/swayidle/default.nix
@@ -0,0 +1,16 @@
+{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";
+      }
+    ];
+  };
+}