about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2024-02-08 03:31:45 +0900
committersefidel <contact@sefidel.net>2024-02-08 03:31:56 +0900
commit612e5150fbe3419d5c556c9cbe974ba7541e5f32 (patch)
treee95ad4150ca9b2854d71d8f56bef16175d5b9675
parent0abe996e4f745d21f52618600a4a9f12b1b98cd2 (diff)
downloadnixrc-612e5150fbe3419d5c556c9cbe974ba7541e5f32.tar.gz
nixrc-612e5150fbe3419d5c556c9cbe974ba7541e5f32.zip
feat(home/gui): turn off rgb lighting before sleep
-rw-r--r--home/profiles/gui/default.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/home/profiles/gui/default.nix b/home/profiles/gui/default.nix
index 764451d..4279f16 100644
--- a/home/profiles/gui/default.nix
+++ b/home/profiles/gui/default.nix
@@ -224,9 +224,16 @@ in
         {
           enable = true;
           events = [
-            { event = "before-sleep"; command = "${pkgs.systemd}/bin/loginctl lock-session"; }
+            {
+              event = "before-sleep";
+              command = "${pkgs.systemd}/bin/loginctl lock-session"
+                + lib.optionalString (!cfg.laptop.enable) "; ${pkgs.openrgb}/bin/openrgb --mode static --color 000000";
+            }
             { event = "lock"; command = lockCommand; }
-          ];
+          ] ++ lib.optionals (!cfg.laptop.enable) [{
+            event = "after-resume";
+            command = "${pkgs.openrgb}/bin/openrgb --mode static --color ffffff";
+          }];
           timeouts = [
             # 4m30s
             { timeout = 270; command = "${pkgs.libnotify}/bin/notify-send -t 30000 'Locking screen in 30 seconds'"; }