From fa5443124c7aded9698e7683eca1e5c31a550ed4 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 18 Dec 2011 03:17:38 +0100 Subject: New -d (decimal digits) monitor option (issue #58) --- src/Plugins/Monitors/Volume.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Plugins/Monitors/Volume.hs') 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 -- cgit v1.2.3