summaryrefslogtreecommitdiffstats
path: root/bin/volmon
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-03-10 16:48:51 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-03-10 16:48:51 (EST)
commit5c1dc577453a8ea922b7c315f0f074ef51c8167c (patch)
tree3cf664655b529e5cf94e1113ef60754e5a34c6ae /bin/volmon
parentb920a869d85771ef08127a4f916c35f602458b1a (diff)
downloadfluxbox-5c1dc577453a8ea922b7c315f0f074ef51c8167c.zip
fluxbox-5c1dc577453a8ea922b7c315f0f074ef51c8167c.tar.gz
fluxbox-5c1dc577453a8ea922b7c315f0f074ef51c8167c.tar.bz2
Add external battery and volume applet programs
Diffstat (limited to 'bin/volmon')
-rwxr-xr-xbin/volmon10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/volmon b/bin/volmon
new file mode 100755
index 0000000..0b1b87e
--- /dev/null
+++ b/bin/volmon
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+main()
+{
+ vol="$(amixer get Master,0 | \
+ sed -n 's/^.*Playback [0-9]* \[\([0-9]*\)%\].*$/\1/p')"
+ printf '🔉%3d%%\n' ${vol}
+}
+
+main "${@}"