summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/Plugins/Monitors/Cpu.hs
diff options
context:
space:
mode:
authorSibi Prabakaran <sibi@psibi.in>2020-06-20 21:39:02 +0530
committerjao <jao@gnu.org>2020-06-23 16:38:20 +0100
commit28ea8d95137131e81c836ed2d446f8925518e85c (patch)
tree16f823a3d81a4bbb22861ce46d869391ab679574 /src/Xmobar/Plugins/Monitors/Cpu.hs
parent148f1083c45bc66112ff18d44f4d2a43d891c5ca (diff)
downloadxmobar-28ea8d95137131e81c836ed2d446f8925518e85c.tar.gz
xmobar-28ea8d95137131e81c836ed2d446f8925518e85c.tar.bz2
Update based on feedback on the PR
Diffstat (limited to 'src/Xmobar/Plugins/Monitors/Cpu.hs')
-rw-r--r--src/Xmobar/Plugins/Monitors/Cpu.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Xmobar/Plugins/Monitors/Cpu.hs b/src/Xmobar/Plugins/Monitors/Cpu.hs
index 7f05663..895eeb3 100644
--- a/src/Xmobar/Plugins/Monitors/Cpu.hs
+++ b/src/Xmobar/Plugins/Monitors/Cpu.hs
@@ -145,7 +145,7 @@ data Field = Field {
data ShouldCompute = Compute | Skip deriving (Eq, Ord, Show)
-formatField :: PureConfig -> CpuOpts -> CpuData -> Field -> IO String
+formatField :: MonitorConfig -> CpuOpts -> CpuData -> Field -> IO String
formatField cpuParams cpuOpts cpuInfo@CpuData {..} Field {..}
| fieldName == barField =
if fieldCompute == Compute
@@ -203,7 +203,7 @@ optimizeAllTemplate args@CpuArguments {..} =
data CpuArguments =
CpuArguments
{ cpuDataRef :: !CpuDataRef
- , cpuParams :: !PureConfig
+ , cpuParams :: !MonitorConfig
, cpuArgs :: ![String]
, cpuOpts :: !CpuOpts
, cpuInputTemplate :: ![(String, String, String)] -- [("Cpu: ","total","% "),("","user","%")]
@@ -217,7 +217,7 @@ getArguments cpuArgs = do
initCpuData <- cpuData
cpuDataRef <- newIORef initCpuData
void $ parseCpu cpuDataRef
- cpuParams <- computePureConfig cpuArgs cpuConfig
+ cpuParams <- computeMonitorConfig cpuArgs cpuConfig
cpuInputTemplate <- runTemplateParser cpuParams
cpuAllTemplate <- runExportParser (pExport cpuParams)
nonOptions <-