summaryrefslogtreecommitdiffstats
path: root/.bin/ag-audio
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2022-01-07 19:36:06 +0100
committerRomain Gonçalves <me@rgoncalves.se>2022-01-07 19:36:06 +0100
commita380254393b2a1e08e4dd02e96e5c206a457ec59 (patch)
tree77c9cd8e883eed16c49119fb2700a5268ce1239d /.bin/ag-audio
parente7b2188fe8dd715603dbd509fc62de6e872933a2 (diff)
downloaddots-a380254393b2a1e08e4dd02e96e5c206a457ec59.tar.gz
Fri Jan 7 07:36:06 PM CET 2022
Diffstat (limited to '.bin/ag-audio')
-rwxr-xr-x.bin/ag-audio12
1 files changed, 8 insertions, 4 deletions
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() {
remember that computers suck.