change: pactl bluetooth fix
This commit is contained in:
parent
35477cd8ac
commit
3fdc43a5da
|
@ -10,7 +10,7 @@ MUTE() {
|
|||
# Mute for pulseaudio/pipewire
|
||||
if [ "$AUDIO" = "pulse" ]; then
|
||||
if [ -e "${BINDIR}pactl" ]; then
|
||||
pactl set-sink-mute 0 toggle
|
||||
pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
if [ -e "${BINDIR}notify-send" ]; then
|
||||
if [ "$remute" = "" ]; then
|
||||
notify-send " Toggled mute"
|
||||
|
@ -30,11 +30,11 @@ MUTE() {
|
|||
RAISE() {
|
||||
if [ "$AUDIO" = "pulse" ]; then
|
||||
if [ -e "${BINDIR}pactl" ]; then
|
||||
if [ "$(pactl get-sink-volume 0 | awk '{ print $5;exit }' | sed 's/%//g')" -gt "100" ]; then
|
||||
pactl set-sink-volume 0 100%
|
||||
if [ "$(pactl get-sink-volume @DEFAULT_SINK@ | awk '{ print $5;exit }' | sed 's/%//g')" -gt "100" ]; then
|
||||
pactl set-sink-volume @DEFAULT_SINK@ 100%
|
||||
else
|
||||
pactl set-sink-volume 0 +10%
|
||||
test ${BINDIR}notify-send && notify-send " $(pactl get-sink-volume 0 | awk '{ print $5;exit }')"
|
||||
pactl set-sink-volume @DEFAULT_SINK@ +10%
|
||||
test ${BINDIR}notify-send && notify-send " $(pactl get-sink-volume @DEFAULT_SINK@ | awk '{ print $5;exit }')"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
|
@ -50,8 +50,8 @@ RAISE() {
|
|||
LOWER() {
|
||||
if [ "$AUDIO" = "pulse" ]; then
|
||||
if [ -e "${BINDIR}pactl" ]; then
|
||||
if [ "$(pactl get-sink-volume 0 | awk '{ print $5;exit }' | sed 's/%//g')" != "0" ]; then
|
||||
pactl set-sink-volume 0 -10%
|
||||
if [ "$(pactl get-sink-volume @DEFAULT_SINK@ | awk '{ print $5;exit }' | sed 's/%//g')" != "0" ]; then
|
||||
pactl set-sink-volume @DEFAULT_SINK@ -10%
|
||||
test ${BINDIR}notify-send && notify-send " $(pactl get-sink-volume 0 | awk '{ print $5;exit }')"
|
||||
fi
|
||||
|
||||
|
@ -69,7 +69,7 @@ LOWER() {
|
|||
GETVOL() {
|
||||
if [ "$AUDIO" = "pulse" ]; then
|
||||
if [ -e "${BINDIR}pactl" ]; then
|
||||
pactl get-sink-volume 0 | awk '{ print $5;exit }'
|
||||
pactl get-sink-volume @DEFAULT_SINK@ | awk '{ print $5;exit }'
|
||||
fi
|
||||
else
|
||||
echo "$(amixer -c 0 get Master | tail -n 1 | sed -r "s/.*\[(.*)%\].*/\1/")%"
|
||||
|
@ -79,7 +79,7 @@ GETVOL() {
|
|||
GETMUTE() {
|
||||
if [ "$AUDIO" = "pulse" ]; then
|
||||
if [ -e "${BINDIR}pactl" ]; then
|
||||
pactl get-sink-mute 0 | sed "s/Mute: //; s/no/Not muted/; s/yes/Muted/g"
|
||||
pactl get-sink-mute @DEFAULT_SINK@ | sed "s/Mute: //; s/no/Not muted/; s/yes/Muted/g"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue