You are not logged in.

#1 2018-10-08 12:37:30

indeedwatson
Member
Registered: 2018-10-07
Posts: 28

Switching headphones and speakers on the fly no longer working

Followed these instructions: https://wiki.archlinux.org/index.php/Pu … on-the-fly

It used to work, I had this script to switch with a keybind:

```
#!/bin/env sh

HEADPHONES='analog-output-headphones'
SPEAKERS='analog-output-lineout'
OUTPUT='alsa_output.pci-0000_00_1b.0.analog-stereo'
currentPort="$(pacmd list-sinks | rg 'active port: <analog-output-')"

case "$currentPort" in
    *${HEADPHONES}*) notify-send "Speakers Active" &&
        pacmd set-sink-port $OUTPUT $SPEAKERS;;
    *${SPEAKERS}*) notify-send "Headphones Active" &&
        pacmd set-sink-port $OUTPUT $HEADPHONES;;
    *)
esac

```

Offline

Board footer

Powered by FluxBB