Skip to content

Instantly share code, notes, and snippets.

View new-penguin's full-sized avatar
🏍️

Tony new-penguin

🏍️
View GitHub Profile
@new-penguin
new-penguin / pipewire-audio-switcher.sh
Created January 20, 2024 13:12
Quickly switch audio in pipewire. Works great when set to a global hotkey
#!/bin/bash
# Define sinks
NORMALIZED='Normalized'
STANDARD='alsa_output.pci-0000_0e_00.4.iec958-stereo'
# Get first line of running audio sink and choose other
if [ $(pactl list short sinks | grep -m 1 RUNNING | awk {'print $2'}) = $STANDARD ]; then
DEVICE=$NORMALIZED
else