diff options
author | P. 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) |
commit | 01822688b2bac01b0934b4d7e73de4aad5e8cf07 (patch) | |
tree | 4fde53083a2f72d4d1e31103e118d0821f36b714 /lib | |
parent | 1e31c3a1d38964847c125c66a75b5b370adcae72 (diff) | |
download | fluxbox-01822688b2bac01b0934b4d7e73de4aad5e8cf07.zip fluxbox-01822688b2bac01b0934b4d7e73de4aad5e8cf07.tar.gz fluxbox-01822688b2bac01b0934b4d7e73de4aad5e8cf07.tar.bz2 |
lib/panel/volmon: Display dB instead of %
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/panel/volmon | 5 |
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 "${@}" |