diff options
author | Alexander Shabalin <shabalyn.a@gmail.com> | 2014-09-24 12:31:54 +0400 |
---|---|---|
committer | Alexander Shabalin <shabalyn.a@gmail.com> | 2014-09-24 12:31:54 +0400 |
commit | f8b7b22253d72b7b6ecf83bac87a8cda41040f49 (patch) | |
tree | 38705b1e87c9f8e7a74d8f2de502fec2c7de1725 /src/Plugins/Monitors/Cpu.hs | |
parent | e26731b1fc292a16230f6517aa292dd3973929ae (diff) | |
download | xmobar-f8b7b22253d72b7b6ecf83bac87a8cda41040f49.tar.gz xmobar-f8b7b22253d72b7b6ecf83bac87a8cda41040f49.tar.bz2 |
Rename dynamic string to icon pattern
Diffstat (limited to 'src/Plugins/Monitors/Cpu.hs')
-rw-r--r-- | src/Plugins/Monitors/Cpu.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Plugins/Monitors/Cpu.hs b/src/Plugins/Monitors/Cpu.hs index 5abde7e..7fed989 100644 --- a/src/Plugins/Monitors/Cpu.hs +++ b/src/Plugins/Monitors/Cpu.hs @@ -21,18 +21,18 @@ import Data.IORef (IORef, newIORef, readIORef, writeIORef) import System.Console.GetOpt data CpuOpts = CpuOpts - { loadDynamicString :: Maybe DynamicString + { loadIconPattern :: Maybe IconPattern } defaultOpts :: CpuOpts defaultOpts = CpuOpts - { loadDynamicString = Nothing + { loadIconPattern = Nothing } options :: [OptDescr (CpuOpts -> CpuOpts)] options = - [ Option "" ["load-dynamic-string"] (ReqArg (\x o -> - o { loadDynamicString = Just $ parseDynamicString x }) "") "" + [ Option "" ["load-icon-pattern"] (ReqArg (\x o -> + o { loadIconPattern = Just $ parseIconPattern x }) "") "" ] parseOpts :: [String] -> IO CpuOpts @@ -44,7 +44,7 @@ parseOpts argv = cpuConfig :: IO MConfig cpuConfig = mkMConfig "Cpu: <total>%" - ["bar","vbar","dstr","total","user","nice","system","idle","iowait"] + ["bar","vbar","ipat","total","user","nice","system","idle","iowait"] type CpuDataRef = IORef [Int] @@ -70,7 +70,7 @@ formatCpu opts xs = do let t = sum $ take 3 xs b <- showPercentBar (100 * t) t v <- showVerticalBar (100 * t) t - d <- showDynamicString (loadDynamicString opts) t + d <- showIconPattern (loadIconPattern opts) t ps <- showPercentsWithColors (t:xs) return (b:v:d:ps) |