aboutsummaryrefslogtreecommitdiff
path: root/blocks/block-vol
diff options
context:
space:
mode:
Diffstat (limited to 'blocks/block-vol')
-rwxr-xr-xblocks/block-vol8
1 files changed, 8 insertions, 0 deletions
diff --git a/blocks/block-vol b/blocks/block-vol
new file mode 100755
index 0000000..cb06750
--- /dev/null
+++ b/blocks/block-vol
@@ -0,0 +1,8 @@
+#!/bin/sh
+if command -v pamixer >/dev/null 2>&1; then
+ pamixer --get-volume-human 2>/dev/null
+elif command -v amixer >/dev/null 2>&1; then
+ amixer get Master | awk -F'[][]' 'END{print $2}'
+else
+ echo "n/a"
+fi