diff options
Diffstat (limited to 'Plugins/Monitors/Common.hs')
-rw-r--r-- | Plugins/Monitors/Common.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Plugins/Monitors/Common.hs b/Plugins/Monitors/Common.hs index 9362fd8..c90c616 100644 --- a/Plugins/Monitors/Common.hs +++ b/Plugins/Monitors/Common.hs @@ -39,6 +39,7 @@ module Plugins.Monitors.Common ( , showWithPadding , showWithColors , showWithColors' + , showPercentWithColors , showPercentsWithColors , showPercentBar , showLogBar @@ -386,6 +387,9 @@ showPercentsWithColors fs = do fstrs <- mapM floatToPercent fs zipWithM (showWithColors . const) fstrs (map (*100) fs) +showPercentWithColors :: Float -> Monitor String +showPercentWithColors f = liftM head $ showPercentsWithColors [f] + showPercentBar :: Float -> Float -> Monitor String showPercentBar v x = do bb <- getConfigValue barBack |