scripts/sound-output-toggle
2022-12-26 14:20:37 +01:00

9 lines
296 B
Bash
Executable File

#!/bin/sh
speakers="alsa_output.pci-0000_05_00.6.analog-stereo"
headphones="alsa_output.usb-Logitech_G432_Gaming_Headset_000000000000-00.analog-stereo"
current="$(pactl get-default-sink)"
[ "$current" = "$headphones" ] && pactl set-default-sink $speakers || pactl set-default-sink $headphones