Handle volume, media and notification keys in the shell (#13424)
* Step the volume in the shell instead of a script per keypress Each volume key ran omarchy-audio-output-volume: several pactl calls in bash, then omarchy-osd delivering the OSD over a qs IPC client, ~165ms from keypress to OSD, on keys that repeat while held. The volume up, down and mute keys now dispatch global shortcuts that the media service handles over PipeWire, stepping, clamping, unmuting and debouncing by the script's rules and showing the same OSD. It acts only when the default sink is an ALSA sink, which is its own physical sink. Any other default, a DSP chain or EasyEffects above all, falls back to the script, which resolves the physical sink from the live routing on every press. The precise +1/-1 keys still run the script. Keypress to OSD drops from ~168ms to ~20ms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Run media and notification keys in the shell without an IPC client The media keys and the notification dismiss, invoke and history keys ran omarchy-shell, starting a qs client for one argument-free IPC call. A new ipc shortcut kind names such a call as target.method. The shell hands it to the service that owns the target, which runs its own IpcHandler function, so the key behaves exactly as the omarchy-shell call did. A call missing from the list binds through omarchy-shell. Dismissing a notification with SUPER+comma clears the popup in ~11ms instead of ~40ms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bf44355a98
commit
804749970a
10 files changed
+200
-28
No files matched your search
@@ -22,11 +22,11 @@ o.bind("SUPER + CTRL + BACKSPACE", "Toggle single-window square aspect", "omarch
|
||||
o.bind_toggle("SUPER + CTRL + ALT + F", "Toggle full screen desktop", "fullscreen-desktop")
|
||||
|
||||
-- xkbcommon names the comma keysym "comma"; the upper-case "COMMA" does not match.
|
||||
o.bind("SUPER + comma", "Dismiss last notification", "omarchy-shell notifications dismissOne")
|
||||
o.bind("SUPER + SHIFT + comma", "Dismiss all notifications", "omarchy-shell notifications dismissAll")
|
||||
o.bind("SUPER + comma", "Dismiss last notification", { ipc = "notifications.dismissOne" })
|
||||
o.bind("SUPER + SHIFT + comma", "Dismiss all notifications", { ipc = "notifications.dismissAll" })
|
||||
o.bind_toggle("SUPER + CTRL + comma", "Toggle silencing notifications", "notification-silencing")
|
||||
o.bind("SUPER + ALT + comma", "Invoke last notification", "omarchy-shell notifications invokeLast")
|
||||
o.bind("SUPER + SHIFT + ALT + comma", "Open notification history", "omarchy-shell notifications showHistory")
|
||||
o.bind("SUPER + ALT + comma", "Invoke last notification", { ipc = "notifications.invokeLast" })
|
||||
o.bind("SUPER + SHIFT + ALT + comma", "Open notification history", { ipc = "notifications.showHistory" })
|
||||
|
||||
o.bind_toggle("SUPER + CTRL + I", "Toggle locking on idle", "idle")
|
||||
o.bind_toggle("SUPER + CTRL + N", "Toggle nightlight", "nightlight")
|
||||
|
||||
Reference in new issue
Block a user