pinosaur
/
dotfiles.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more scripts
[dotfiles.git]
/
Scripts
/
statusbar
/
blocks_vol
diff --git
a/Scripts/statusbar/blocks_vol
b/Scripts/statusbar/blocks_vol
index
4bb4ab9
..
868c1bf
100755
(executable)
--- a/
Scripts/statusbar/blocks_vol
+++ b/
Scripts/statusbar/blocks_vol
@@
-1,10
+1,14
@@
#!/bin/sh
#!/bin/sh
-volume="$(amixer sget Master | grep 'Mono:' | awk -F'[][]' '{ print $2 }')"
+# Audio status for pulseaudio with pulsemixer
-icon=""
-[ ${volume%\%} -gt "0" ] && icon=""
-[ ${volume%\%} -gt "50" ] && icon=""
-[ ${volume%\%} -gt "75" ] && icon=""
-echo -e "$icon $volume"
+volume="$(pulsemixer --get-volume | awk '{ print $1 }')"
+icon=""
+[ "$volume" -gt "0" ] && icon=""
+[ "$volume" -gt "50" ] && icon=""
+[ "$volume" -gt "75" ] && icon=""
+
+[ "$(pulsemixer --get-mute)" = 1 ] && icon="ﱝ" && volume="XX"
+
+printf "$icon $volume%%"