Migrate audio menu logic to appmenu and add indicator for current out device
This commit is contained in:
parent
e7032a4f7f
commit
3c1fbd9e8d
3 changed files with 22 additions and 12 deletions
|
@ -1,27 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
OUTINPUT="$(
|
||||
echo "Speaker
|
||||
Headphones
|
||||
Earpiece
|
||||
Close Menu" | dmenu -p "Audio Out" -c -fn "Terminus-30" -l 20
|
||||
)"
|
||||
|
||||
[[ "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
|
||||
|
||||
echo 1 > /tmp/sxmo_bar
|
Loading…
Add table
Add a link
Reference in a new issue