cranberry: Backlighting

This commit is contained in:
Geoffrey Frogeye 2024-06-24 14:03:59 +02:00
parent 498357fffc
commit ea1c390bc0
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
2 changed files with 16 additions and 1 deletions

View file

@ -13,6 +13,21 @@
frogeye.desktop = {
x11_screens = [ "eDP-1" ];
maxVideoHeight = 1080;
phasesCommands = {
jour = ''
echo 0 | sudo tee /sys/class/leds/chromeos::kbd_backlight/brightness &
${pkgs.brightnessctl}/bin/brightnessctl set 30% &
'';
crepuscule = ''
echo 1 | sudo tee /sys/class/leds/chromeos::kbd_backlight/brightness &
${pkgs.brightnessctl}/bin/brightnessctl set 10% &
'';
nuit = ''
echo 10 | sudo tee /sys/class/leds/chromeos::kbd_backlight/brightness &
${pkgs.brightnessctl}/bin/brightnessctl set 0% &
'';
};
};
# Alt key swallowed the Meta one
@ -26,6 +41,5 @@
nixos-hardware.nixosModules.common-gpu-amd
nixos-hardware.nixosModules.common-pc-laptop
nixos-hardware.nixosModules.common-pc-ssd
# TODO Fix sound
];
}

View file

@ -19,6 +19,7 @@ in
sudo "$switch" boot &
fi
${builtins.getAttr phase.command config.frogeye.desktop.phasesCommands}
wait
''))
phases) ++ (with pkgs; [
brightnessctl