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
|
|
@ -33,10 +33,30 @@
|
|||
HandleLidSwitchExternalPower = "suspend";
|
||||
};
|
||||
|
||||
home-manager.users.fred = { ... }: {
|
||||
home-manager.users.fred = { pkgs, ... }: {
|
||||
wayland.windowManager.hyprland.settings.monitor =
|
||||
[ ",preferred,auto,auto" ];
|
||||
|
||||
# wob reads 0-100 integers from a FIFO and shows a progress bar overlay
|
||||
systemd.user.services.wob = {
|
||||
Unit = {
|
||||
Description = "Wayland OSD Bar";
|
||||
After = [ "graphical-session.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.writeShellScript "wob-start" ''
|
||||
rm -f "%t/wob.fifo"
|
||||
mkfifo "%t/wob.fifo"
|
||||
tail -f "%t/wob.fifo" | ${pkgs.wob}/bin/wob
|
||||
''}";
|
||||
ExecStopPost = "${pkgs.coreutils}/bin/rm -f %t/wob.fifo";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
systemd.user.services.kbd-backlight-init = {
|
||||
Unit = {
|
||||
Description = "Set keyboard backlight to 10% on login";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue