about summary refs log tree commit diff
path: root/home/profiles
diff options
context:
space:
mode:
Diffstat (limited to 'home/profiles')
-rw-r--r--home/profiles/base/default.nix18
1 files changed, 17 insertions, 1 deletions
diff --git a/home/profiles/base/default.nix b/home/profiles/base/default.nix
index ab84648..0761fb8 100644
--- a/home/profiles/base/default.nix
+++ b/home/profiles/base/default.nix
@@ -68,7 +68,6 @@ in
       # Sway
       pkgs.autotiling
       pkgs.swaylock-effects
-      pkgs.swayidle
       pkgs.swaybg
       pkgs.wayland-utils
       pkgs.wl-clipboard
@@ -236,6 +235,23 @@ in
         settings = import ./config/dunst.nix { inherit neotheme; };
       };
 
+      swayidle = {
+        enable = true;
+        events = [
+          { event = "before-sleep"; command = "${pkgs.swaylock-effects}/bin/swaylock -fFc ${neotheme.colors.background} --indicator"; }
+          { event = "lock"; command = "${pkgs.swaylock-effects}/bin/swaylock -fFc ${neotheme.colors.background} --indicator"; }
+        ];
+        timeouts = [
+          { timeout = 230; command = "${pkgs.libnotify}/bin/notify-send -t 30000 'Locking screen in 30 seconds'"; }
+          { timeout = 300; command = "${pkgs.swaylock-effects}/bin/swaylock -fFc ${neotheme.colors.background} --indicator"; }
+          {
+            timeout = 600;
+            command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'";
+            resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'";
+          }
+        ];
+      };
+
       wlsunset = {
         enable = true;
         latitude = "36.5";