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.
31 lines
676 B
31 lines
676 B
5 years ago
|
#!/usr/bin/env sh
|
||
|
pidof svkbd-sxmo || svkbd-sxmo &
|
||
|
|
||
|
OUTINPUT="$(
|
||
|
echo "speaker
|
||
|
headphones
|
||
|
earpiece
|
||
|
none
|
||
|
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 > /dev/null
|
||
|
amixer set "$HEADPHONE" mute > /dev/null
|
||
|
amixer set "$EARPIECE" mute > /dev/null
|
||
|
|
||
|
if [[ "$OUTINPUT" = "speaker" ]]; then
|
||
|
amixer set "$SPEAKER" unmute > /dev/null
|
||
|
elif [[ "$OUTINPUT" = "headphones" ]]; then
|
||
|
amixer set "$HEADPHONE" unmute > /dev/null
|
||
|
elif [[ "$OUTINPUT" = "earpiece" ]]; then
|
||
|
amixer set "$EARPIECE" unmute > /dev/null
|
||
|
fi
|
||
|
|