aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorCamil Staps2016-02-09 14:48:23 +0100
committerCamil Staps2016-11-30 19:11:06 +0100
commit9d50eab999c17572db9df330e4ca6dc07d46b31c (patch)
treec19613fe8dfa5d23b9c1a5d1d86ae342efbebd30 /bin
parentFixed oh-my-zsh (diff)
Keyboard layout; volume in xmobar
Diffstat (limited to 'bin')
-rwxr-xr-xbin/volume8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/volume b/bin/volume
new file mode 100755
index 0000000..3e22a2b
--- /dev/null
+++ b/bin/volume
@@ -0,0 +1,8 @@
+#!/bin/bash
+volumes=$(amixer get Master |grep % |awk '{print $5}'|sed 's/[^0-9]//g')
+#avg=$(awk '{ print ($1+$2)/2 }' <(echo $volumes))
+if [[ $1 == 'L' ]]; then
+ echo "$(echo $volumes | cut -d' ' -f1)%"
+else
+ echo "$(echo $volumes | cut -d' ' -f2)%"
+fi