summaryrefslogtreecommitdiffstats
path: root/lib/panel/volmon
diff options
context:
space:
mode:
Diffstat (limited to 'lib/panel/volmon')
-rwxr-xr-xlib/panel/volmon5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/panel/volmon b/lib/panel/volmon
index 0b1b87e..705ae30 100755
--- a/lib/panel/volmon
+++ b/lib/panel/volmon
@@ -3,8 +3,9 @@
main()
{
vol="$(amixer get Master,0 | \
- sed -n 's/^.*Playback [0-9]* \[\([0-9]*\)%\].*$/\1/p')"
- printf '🔉%3d%%\n' ${vol}
+ sed -n 's/^.*Playback [0-9]* \[[0-9]*%\] '$(: \
+ )'\[\(-*[0-9]*\)\.[0-9]*dB\] .*$/\1/p')"
+ printf '🔉%3ddB\n' ${vol}
}
main "${@}"