From 0f08d04698c814955116b6bae50752e64b774d8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Thu, 23 Dec 2021 18:28:03 +0000 Subject: Thu Dec 23 06:28:03 PM UTC 2021 --- .bin/ag-audio | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 .bin/ag-audio (limited to '.bin/ag-audio') diff --git a/.bin/ag-audio b/.bin/ag-audio new file mode 100755 index 0000000..f39522f --- /dev/null +++ b/.bin/ag-audio @@ -0,0 +1,55 @@ +#!/bin/sh + +__increase() { + pamixer -i "${1:-10}" +} + +__decrease() { + pamixer -d "${1:-10}" +} + +__mic_toggle() { + pamixer --default-source -t +} + +__toggle() { + pamixer -t +} + +__next() { + cmus-remote -n +} + +__prev() { + cmus-remote -r +} + +__play() { + cmus-remote -u +} + +case "${1}" in + i*) + __increase "${2}" + ;; + d*) + __decrease "${2}" + ;; + mic-t*) + __mic_toggle + ;; + t*) + __toggle + ;; + n*) + __next + ;; + pr*) + __prev + ;; + pl*) + __play + ;; +esac + +ag-status &>/dev/null -- cgit v1.2.3