Skip to content

Instantly share code, notes, and snippets.

@fsantand
Created November 22, 2023 14:02
Show Gist options
  • Save fsantand/eb52a2bd46d833e1d4351057426d17ab to your computer and use it in GitHub Desktop.
Save fsantand/eb52a2bd46d833e1d4351057426d17ab to your computer and use it in GitHub Desktop.
[Pipewire/Wireplumber] - Shortcut to change between multiples sinks/sources
wpctl status -n | grep $1 | awk '/vol/{print$2$3$4}' | sed 's/\*//' | sed 's/.alsa.*//' | xargs -I {} wpctl set-default {}
// i3 config
mode "audio" {
// Here you add the shortcut you want for your
bindsym h exec --no-startup-id "~/.config/i3/scripts/audio-switcher alsa_output.usb-Corsair_CORSAIR_HS80_RGB_Wireless_Gaming_Receiver_16ce735800070215-00.analog-stereo"
bindsym s exec --no-startup-id "~/.config/i3/scripts/audio-switcher alsa_output.pci-0000_0d_00.4.analog-stereo"
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Shift+o mode "audio"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment