diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2021-12-23 18:28:03 +0000 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2021-12-23 18:28:03 +0000 |
commit | 0f08d04698c814955116b6bae50752e64b774d8f (patch) | |
tree | 8cf9a33557093eebfd25aab2872e97639c7e2f62 /.bin/ag-audio | |
download | dots-0f08d04698c814955116b6bae50752e64b774d8f.tar.gz |
Thu Dec 23 06:28:03 PM UTC 2021
Diffstat (limited to '.bin/ag-audio')
-rwxr-xr-x | .bin/ag-audio | 55 |
1 files changed, 55 insertions, 0 deletions
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 |