10 lines
300 B
Bash
Executable file
10 lines
300 B
Bash
Executable file
#!/bin/env sh
|
|
|
|
HEADPHONES="$(~/.config/eww/scripts/get-audio-device-id 'headphones')"
|
|
SPEAKERS="$(~/.config/eww/scripts/get-audio-device-id 'speakers')"
|
|
|
|
if [ "$(pactl get-default-sink)" = "${SPEAKERS}" ] ; then
|
|
pactl set-default-sink "${HEADPHONES}"
|
|
else
|
|
pactl set-default-sink "${SPEAKERS}"
|
|
fi
|