From f25ce880d7cd7b0e61a16bcfda57ef3752d8803d Mon Sep 17 00:00:00 2001
From: Frantisek Bohacek <rutherther@proton.me>
Date: Tue, 23 Jul 2024 21:33:32 +0200
Subject: [PATCH] feat: add idle mode to mako to show notifications
 indefinitely when idle

---
 home/modules/profiles/desktop/dwl/default.nix | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/home/modules/profiles/desktop/dwl/default.nix b/home/modules/profiles/desktop/dwl/default.nix
index e812a3a..57a8536 100644
--- a/home/modules/profiles/desktop/dwl/default.nix
+++ b/home/modules/profiles/desktop/dwl/default.nix
@@ -128,26 +128,28 @@ in {
 
           height = 250;
           margin = 5;
-          padding = 16;
+          padding = 24;
           max-icon-size = 16;
           layer = "overlay";
 
           default-timeout = 5000;
+          ignore-timeout = 1;
         };
 
         sections = [
           {
-            conditions = { urgency = "critical"; };
+            conditions = { mode = "idle"; };
             config = {
-              border-color = "#${urgent}FF";
+              border-color = "#${background.secondary}FF";
+              ignore-timeout = 1;
+              default-timeout = 0;
             };
           }
 
           {
-            conditions = { mode = "idle"; };
+            conditions = { urgency = "critical"; };
             config = {
-              ignore-timeout = 1;
-              default-timeout = 0;
+              border-color = "#${urgent}FF";
             };
           }
         ];
@@ -168,7 +170,7 @@ in {
       timeouts = [
         { timeout = 300; command = lib.getExe wlopmDisableScreens; resumeCommand = lib.getExe wlopmEnableScreens; }
         { timeout = 1800; command = "${lib.getExe' pkgs.systemd "systemctl"} suspend"; }
-        { timeout = 5; command = "${lib.getExe' pkgs.mako "makoctl"} -a idle"; resumeCommand = "${lib.getExe' pkgs.mako "makoctl"} -r idle"; }
+        { timeout = 10; command = "${lib.getExe' pkgs.mako "makoctl"} mode -a idle"; resumeCommand = "${lib.getExe' pkgs.mako "makoctl"} mode -r idle"; }
       ];
     };
 
-- 
2.48.1