summaryrefslogtreecommitdiffstats
path: root/.bin/ag-audio
diff options
context:
space:
mode:
Diffstat (limited to '.bin/ag-audio')
-rwxr-xr-x.bin/ag-audio55
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
remember that computers suck.