You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/usr/bin/env sh
|
|
|
|
pidof svkbd-sxmo || svkbd-sxmo &
|
|
|
|
|
|
|
|
OUTINPUT="$(
|
|
|
|
echo "Speaker
|
|
|
|
Headphones
|
|
|
|
Earpiece
|
|
|
|
Close Menu" | dmenu -p "Audio Out" -c -fn "Terminus-30" -l 20
|
|
|
|
)"
|
|
|
|
|
|
|
|
pkill svkbd-sxmo
|
|
|
|
[[ "Close Menu" == "$OUTINPUT" ]] && exit 0
|
|
|
|
|
|
|
|
SPEAKER="Line Out"
|
|
|
|
HEADPHONE="Headphone"
|
|
|
|
EARPIECE="Earpiece"
|
|
|
|
|
|
|
|
amixer set "$SPEAKER" mute
|
|
|
|
amixer set "$HEADPHONE" mute
|
|
|
|
amixer set "$EARPIECE" mute
|
|
|
|
|
|
|
|
if [[ "$OUTINPUT" = "Speaker" ]]; then
|
|
|
|
amixer set "$SPEAKER" unmute
|
|
|
|
elif [[ "$OUTINPUT" = "Headphones" ]]; then
|
|
|
|
amixer set "$HEADPHONE" unmute
|
|
|
|
elif [[ "$OUTINPUT" = "Earpiece" ]]; then
|
|
|
|
amixer set "$EARPIECE" unmute
|
|
|
|
fi
|
|
|
|
|