volume information conform with i3-status style

* icon now displays on the left of the icon, matching other bar elements
* stereo speakers do not cause 2 sets of icons
* if output is muted, only the mute icon is displayed
This commit is contained in:
decantr 2019-09-04 20:05:28 +01:00
parent 57e2bf3539
commit 4649f24b76
No known key found for this signature in database
GPG Key ID: 0439DF0FFBB01323

View File

@ -39,7 +39,7 @@ status() { \
# Get the volume of ALSA's master volume output. Show an icon if or
# not muted.
amixer get Master | grep -o "[0-9]*%\|\[on\]\|\[off\]" | sed "s/\[on\]//;s/\[off\]//"
amixer get Master | grep -o "[0-9]*%\|\[on\]\|\[off\]" | tr '\n' ' ' | sed -e '/off/c' -e 's/\[on\]//' | awk '{print $2 " " $1}' | xargs
echo "$delim"