Add brightess control for laptops

This commit is contained in:
Yorick Barbanneau 2023-09-03 01:31:50 +02:00
parent 441b0ff9af
commit 29945ce524

View file

@ -1,4 +1,4 @@
{ pkgs, config, ...}:
{ pkgs, config, hostConfig, ...}:
{
wayland.windowManager.sway = {
enable = true;
@ -89,8 +89,8 @@
"${mod}+a" = "focus parent";
"${mod}+Shift+p" = "move scratchpad";
"${mod}+p" = "scratchpad show";
"${mod}+F1" = "exec brightnessctl s 1%-";
"${mod}+F2" = "exec brightnessctl s +1%";
"${mod}+F1" = (if hostConfig.laptop then "${pkgs.brightnessctl}/bin/brightnessctl s 1%-" else null);
"${mod}+F2" = (if hostConfig.laptop then "${pkgs.brightnessctl}/bin/brightnessctl s +1%" else null);
"${mod}+F3" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
"${mod}+F4" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
"${mod}+F5" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";