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