macbook: add wob OSD for keyboard backlight keys
wob (Wayland OSD Bar) runs as a systemd user service listening on a FIFO. Keyboard brightness keybindings now pipe the new brightness percentage to the FIFO after each adjustment, showing a progress bar overlay. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
b4be9a9339
commit
43c251b90d
2 changed files with 33 additions and 3 deletions
|
|
@ -313,8 +313,18 @@ in
|
|||
", XF86MonBrightnessUp, exec, swayosd-client --brightness raise"
|
||||
", XF86MonBrightnessDown, exec, swayosd-client --brightness lower"
|
||||
] ++ lib.optionals isMacbook [
|
||||
", XF86KbdBrightnessUp, exec, brightnessctl -d smc::kbd_backlight set +10%"
|
||||
", XF86KbdBrightnessDown, exec, brightnessctl -d smc::kbd_backlight set 10%-"
|
||||
", XF86KbdBrightnessUp, exec, ${pkgs.writeShellScript "kbd-bright-up" ''
|
||||
${pkgs.brightnessctl}/bin/brightnessctl -d smc::kbd_backlight set +10%
|
||||
brightness=$(${pkgs.brightnessctl}/bin/brightnessctl -d smc::kbd_backlight get)
|
||||
max=$(${pkgs.brightnessctl}/bin/brightnessctl -d smc::kbd_backlight max)
|
||||
echo $(( brightness * 100 / max )) > "$XDG_RUNTIME_DIR/wob.fifo"
|
||||
''}"
|
||||
", XF86KbdBrightnessDown, exec, ${pkgs.writeShellScript "kbd-bright-down" ''
|
||||
${pkgs.brightnessctl}/bin/brightnessctl -d smc::kbd_backlight set 10%-
|
||||
brightness=$(${pkgs.brightnessctl}/bin/brightnessctl -d smc::kbd_backlight get)
|
||||
max=$(${pkgs.brightnessctl}/bin/brightnessctl -d smc::kbd_backlight max)
|
||||
echo $(( brightness * 100 / max )) > "$XDG_RUNTIME_DIR/wob.fifo"
|
||||
''}"
|
||||
];
|
||||
|
||||
bindl = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue