summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2021-08-21 20:41:44 (EDT)
committer P. J. McDermott <pj@pehjota.net>2021-08-21 20:41:44 (EDT)
commit01822688b2bac01b0934b4d7e73de4aad5e8cf07 (patch)
tree4fde53083a2f72d4d1e31103e118d0821f36b714
parent1e31c3a1d38964847c125c66a75b5b370adcae72 (diff)
downloadfluxbox-01822688b2bac01b0934b4d7e73de4aad5e8cf07.zip
fluxbox-01822688b2bac01b0934b4d7e73de4aad5e8cf07.tar.gz
fluxbox-01822688b2bac01b0934b4d7e73de4aad5e8cf07.tar.bz2
lib/panel/volmon: Display dB instead of %
-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 "${@}"