summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors/Volume.hs
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2011-12-18 03:17:38 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2011-12-18 03:17:38 +0100
commitfa5443124c7aded9698e7683eca1e5c31a550ed4 (patch)
tree006fdebe6e83a1b4619cb8c0f9060274f41a357d /src/Plugins/Monitors/Volume.hs
parent1e43372a6112a8f07ab47be470ba68633f96741b (diff)
downloadxmobar-fa5443124c7aded9698e7683eca1e5c31a550ed4.tar.gz
xmobar-fa5443124c7aded9698e7683eca1e5c31a550ed4.tar.bz2
New -d (decimal digits) monitor option (issue #58)
Diffstat (limited to 'src/Plugins/Monitors/Volume.hs')
-rw-r--r--src/Plugins/Monitors/Volume.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Plugins/Monitors/Volume.hs b/src/Plugins/Monitors/Volume.hs
index 3e3a8b9..8eef780 100644
--- a/src/Plugins/Monitors/Volume.hs
+++ b/src/Plugins/Monitors/Volume.hs
@@ -97,8 +97,9 @@ formatDb opts dbi = do
h <- getConfigValue highColor
m <- getConfigValue normalColor
l <- getConfigValue lowColor
+ d <- getConfigValue decDigits
let db = fromIntegral dbi / 100.0
- digits = showDigits 0 db
+ digits = showDigits d db
startColor | db >= highDbThresh opts = colorHelper h
| db < lowDbThresh opts = colorHelper l
| otherwise = colorHelper m