diff options
Diffstat (limited to 'Plugins/Monitors')
| -rw-r--r-- | Plugins/Monitors/Common.hs | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/Plugins/Monitors/Common.hs b/Plugins/Monitors/Common.hs index 26b6289..8e2703f 100644 --- a/Plugins/Monitors/Common.hs +++ b/Plugins/Monitors/Common.hs @@ -51,6 +51,7 @@ import Control.Monad.Reader  import qualified Data.ByteString.Lazy.Char8 as B  import Data.IORef  import qualified Data.Map as Map  +import Data.List  import Numeric @@ -262,9 +263,10 @@ showWithColors f x =      do h <- getConfigValue high         l <- getConfigValue low         let col = setColor $ f x -       head $ [col highColor | x > fromIntegral h ] ++ -              [col normalColor | x > fromIntegral l ] ++ -              [col lowColor | True] +           [ll,hh] = map fromIntegral $ sort [l, h] -- consider high < low  +       head $ [col highColor   | x > hh ] ++ +              [col normalColor | x < ll ] ++ +              [col lowColor    | True]  -- $threads | 
