Audio: hardware volume keys, chandra-ctl volume, and an OSD pill
CI / test (push) Failing after 51s

- Map VolumeUp, VolumeDown, and Mute keys to wpctl (PipeWire) or pactl, run asynchronously so the compositor never blocks
- Hold a volume key to repeat it; volume keys also work while the screen is off, without waking it
- Keep volume keys as the shutter when chandra-camera has focus; Mute still toggles system audio
- Add `chandra-ctl volume [up|down|mute|unmute|toggle|PCT|status]` and a transient Volume OSD
- Add volume-up, volume-down, and volume-mute entries to the shortcut table
This commit is contained in:
nandi committed 2026-11-28 20:01:58 -08:00
1 parent ebdd330eb5
commit 68912f6d64
11 files changed
+909 -1

No files matched your search

+7
View File
@@ -58,6 +58,10 @@ pub(all) enum ShortcutAction {
DockApps
/// The emoji picker (compositor/host/emoji_picker.mbt), like Windows' Win+.
EmojiPicker
/// Hardware/media audio volume keys (compositor/host/volume.mbt).
VolumeUp
VolumeDown
VolumeMute
} derive(Eq, Debug)
///| One row of the shortcut table.
@@ -88,6 +92,9 @@ pub let shortcut_table : Array[ShortcutDef] = [
{ id: "dock-apps", label: "Open dock app 1-9", action: DockApps, default_text: "Super+1" },
{ id: "overview", label: "Overview of all windows", action: Overview, default_text: "Super+W" },
{ id: "emoji-picker", label: "Emoji picker", action: EmojiPicker, default_text: "Super+Period" },
{ id: "volume-up", label: "Volume up", action: VolumeUp, default_text: "VolumeUp" },
{ id: "volume-down", label: "Volume down", action: VolumeDown, default_text: "VolumeDown" },
{ id: "volume-mute", label: "Mute audio", action: VolumeMute, default_text: "Mute" },
]
///| evdev code -> key name, for the keys a combo can end in (US layout names).