Add audio subsystem with mute and volume controls

Update flake.lock dependencies to latest revisions
This commit is contained in:
2026-04-07 01:05:33 +02:00
parent 0f37989f55
commit 8e01c8c33a
12 changed files with 186 additions and 23 deletions
+35
View File
@@ -41,6 +41,12 @@ pub enum Action {
ZoomIn,
/// Zoom the view out.
ZoomOut,
/// Mute music.
Mute,
/// Volume up.
VolumeUp,
/// Volume down.
VolumeDown,
/// Matches any character key; the inner `char` is the actual key pressed.
WildCard(char),
}
@@ -61,6 +67,8 @@ pub enum Group {
Input,
/// Zoom related bindings.
Zoom,
/// Music related bindings.
Music,
/// Quit related bindings.
Quit,
}
@@ -236,6 +244,33 @@ pub static KEYBINDINGS: &[KeyBinding] = &[
symbol: ".",
description: "Zoom out",
},
KeyBinding {
action: Action::Mute,
code: KeyCode::Char('m'),
kind: KeyEventKind::Press,
modifiers: KeyModifiers::NONE,
group: Group::Music,
symbol: "m",
description: "Mute music",
},
KeyBinding {
action: Action::VolumeUp,
code: KeyCode::Char('b'),
kind: KeyEventKind::Press,
modifiers: KeyModifiers::NONE,
group: Group::Music,
symbol: "b",
description: "Increase music volume",
},
KeyBinding {
action: Action::VolumeDown,
code: KeyCode::Char('n'),
kind: KeyEventKind::Press,
modifiers: KeyModifiers::NONE,
group: Group::Music,
symbol: "n",
description: "Decrease music volume",
},
KeyBinding {
action: Action::WildCard('_'),
code: KeyCode::Char('_'),