fix(osd): show OSD at 100% via fabric-cli exec from keybinds

- Add osd_show_audio/osd_show_brightness methods on OSDWindow
- Register as standalone functions in __main__ for fabric-cli exec
- Keybinds now chain fabric-cli exec after wpctl/brightnessctl
- Emit brightness signal on threshold bypass for small changes
This commit is contained in:
sankalp committed 2026-07-17 12:24:34 +05:45
1 parent 4f36ada1c5
commit aeccbe3089
4 files changed
+38 -5

No files matched your search

+24
View File
@@ -50,6 +50,30 @@ for key, args in pairs({
hl.bind(key, hl.dsp.exec_cmd(cmd))
end
for key, cmd in pairs({
AudioRaiseVolume = "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+",
AudioLowerVolume = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-",
AudioMute = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
AudioMicMute = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle",
}) do
hl.bind(
"XF86" .. key,
hl.dsp.exec_cmd(cmd .. " ; " .. fabricSend .. ' "osd_show_audio()"'),
{ locked = true, repeating = true }
)
end
for key, cmd in pairs({
MonBrightnessUp = "brightnessctl -e4 -n2 set 5%+",
MonBrightnessDown = "brightnessctl -e4 -n2 set 5%-",
}) do
hl.bind(
"XF86" .. key,
hl.dsp.exec_cmd(cmd .. " ; " .. fabricSend .. ' "osd_show_brightness()"'),
{ locked = true, repeating = true }
)
end
-- Layer Rules
hl.layer_rule({
match = {