From 1d02a0f4c66ca9cc03eb0ee74003909d87decdf1 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 9 Dec 2025 00:24:42 +0100 Subject: lidControl: use brightnessctl on non-X VTs --- modules/lidControl.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'modules') diff --git a/modules/lidControl.nix b/modules/lidControl.nix index a35e178..a109f7b 100644 --- a/modules/lidControl.nix +++ b/modules/lidControl.nix @@ -35,6 +35,16 @@ run_on_display ${pkgs.xorg.xset}/bin/xset dpms force off ;; esac + else + case $3 in + open) + ${pkgs.brightnessctl}/bin/brightnessctl --restore >/dev/null 2>&1 + ;; + close) + ${pkgs.brightnessctl}/bin/brightnessctl --save >/dev/null 2>&1 + ${pkgs.brightnessctl}/bin/brightnessctl --quiet set 0 + ;; + esac fi ''; services.logind.lidSwitch = "ignore"; -- cgit v1.2.3