From a380254393b2a1e08e4dd02e96e5c206a457ec59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Fri, 7 Jan 2022 19:36:06 +0100 Subject: Fri Jan 7 07:36:06 PM CET 2022 --- .bin/ag-audio | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to '.bin/ag-audio') diff --git a/.bin/ag-audio b/.bin/ag-audio index f39522f..c39fd61 100755 --- a/.bin/ag-audio +++ b/.bin/ag-audio @@ -1,19 +1,23 @@ #!/bin/sh __increase() { - pamixer -i "${1:-10}" + pactl set-sink-volume @DEFAULT_SINK@ "+${1:-10}%" } __decrease() { - pamixer -d "${1:-10}" + pactl set-sink-volume @DEFAULT_SINK@ "-${1:-10}%" } __mic_toggle() { - pamixer --default-source -t + pactl set-source-mute @DEFAULT_SOURCE@ toggle + pactl get-source-mute @DEFAULT_SOURCE@ | grep no >/dev/null 2>&1 + echo "${?}" > /sys/class/leds/platform::micmute/brightness } __toggle() { - pamixer -t + pactl set-sink-mute @DEFAULT_SINK@ toggle + pactl get-sink-mute @DEFAULT_SINK@ | grep no >/dev/null 2>&1 + echo "${?}" > /sys/class/leds/platform::mute/brightness } __next() { -- cgit v1.2.3