From 612e5150fbe3419d5c556c9cbe974ba7541e5f32 Mon Sep 17 00:00:00 2001 From: sefidel Date: Thu, 8 Feb 2024 03:31:45 +0900 Subject: feat(home/gui): turn off rgb lighting before sleep --- home/profiles/gui/default.nix | 11 +++++++++-- 1 file 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'"; } -- cgit 1.4.1