Unmaintained space


For a few months now, I have a global push-to-talk shortcut. Before discussing it, here is the sway configuration:

bindcode --locked --no-repeat {
    # Permanently unmute microphone
    $mod+121 exec "pactl set-source-mute @DEFAULT_SOURCE@ 0"
    # Push-to-talk style unmute microphone
    121 exec "pactl set-source-mute @DEFAULT_SOURCE@ 0"
    # Push-to-talk style mute microphone
    --release 121 exec "pactl set-source-mute @DEFAULT_SOURCE@ 1"

Keycode 121 is for XF86AudioMute, as shown by wev:

                      sym: XF86AudioMute (269025042), utf8: ''
[14:     wl_keyboard] key: serial: 185212; time: 96900271; key: 121; state: 1 (pressed)

Since I never use it to mute my audio output (toggling play/pause on any media is far enough and lowering the volume down is still possible for extreme situations), it was available to bind to to audio input. Moreover, audio input clearly is something I want to mute regularly and easily, both for privacy purpose and voice chat etiquette.

Now about this config's properties:

  • It's global and managed by my compositor:
    • I can be anywhere, even deep in a full-screen game, the shortcut will work.
    • I can use any voice application, in a web browser or not, the shortcut will work, and still behave the same.
  • It manages the @DEFAULT_SOURCE@, meaning I can change my audio input to any device, it'll work the same.
  • It actually binds three commands:
    • Permanent unmute, with Super+AudioMute: when typing it, I always know I'll be permanently unmuted, useful for long speeches in video-calls or gaming with my fellows.
    • Push-to-talk unmute, pressing AudioMute: when pressing it, I always know I can speak, audio input is active.
    • Push-to-talk mute, releasing AudioMute: when releasing it, I always know I end up muted.

In any configuration, I have a shortcut bringing me to any desired state: permanent unmute, push-to-talk unmute, permanent mute.
And the best: I don't even need any visual feedback! (although I have one on Waybar just in case)

Many thanks to the guy behind Corners were cut that came up to me with this configuration idea one day, that's one of my best ergonomic improvements since the day I discovered tiling WM.

Edit: thanks to Nabos for pointing out the --no-repeat option.