Use pactl to control muting/unmuting for compatibility.
This commit is contained in:
parent
1ff55c976f
commit
3ed6dd158b
@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
amixer set Capture toggle @> /dev/null
|
||||
|
||||
str=$(grep '\[on\]\|\[off\]' <<< $(amixer get Capture) | awk '{print $5}')
|
||||
echo $str
|
||||
notify-send "Microphone: $str"
|
||||
pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||
str=$(pactl get-source-mute @DEFAULT_SOURCE@| awk '{print $2}')
|
||||
|
||||
[[ "$str" == "yes" ]] && notify-send "Microphone: off"
|
||||
[[ "$str" == "no" ]] && notify-send "Microphone: on"
|
||||
|
Loading…
Reference in New Issue
Block a user