commit c3e5de79c3c4ed4742cbcd42334ec3137cead4dc
parent 63db0a6e182a141e111e9dea8cb8e6d0ce1b3cba
Author: Vincent Demeester <vincent@sbr.pm>
Date: Fri, 19 Aug 2022 19:43:00 +0200
systems/wakasu: properly set backlight bindings
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/systems/hardware/thinkpad-x1g9.nix b/systems/hardware/thinkpad-x1g9.nix
@@ -30,6 +30,7 @@
enableAllFirmware = true;
trackpoint.enable = false;
cpu.intel.updateMicrocode = true;
+ opengl.extraPackages = with pkgs; [ vaapiIntel ];
};
services = {
hardware.bolt.enable = true;
@@ -71,6 +72,7 @@
udev.extraRules = ''
# Rules for Lenovo Thinkpad WS Dock
ACTION=="add", SUBSYSTEM=="thunderbolt", ATTR{authorized}=="0", ATTR{authorized}="1"
+ ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness"
'';
};
}
diff --git a/users/vincent/desktop/sway.nix b/users/vincent/desktop/sway.nix
@@ -111,6 +111,11 @@ in
"${mod}+o" = "mode resize";
"${mod}+Shift+o" = "exec ${pkgs.swaylock}/bin/swaylock -i $HOME/desktop/pictures/lockscreen";
+
+ "XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 10%+";
+ "XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 10%-";
+ "Shift+XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 1%+";
+ "Shift+XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 1%-";
};
window.commands = [
{