xmobar

Portabilityunportable
Stabilityunstable
MaintainerJuraj Hercek <juhe_haskell@hck.sk>
Safe HaskellNone

Plugins.Monitors.CoreCommon

Description

The common part for cpu core monitors (e.g. cpufreq, coretemp)

Synopsis

Documentation

checkedDataRetrieval :: (Ord a, Num a) => String -> [[String]] -> Maybe (String, String -> Int) -> (Double -> a) -> (a -> String) -> Monitor String

retrieveData :: (Ord a, Num a) => [String] -> Maybe (String, String -> Int) -> (Double -> a) -> (a -> String) -> Monitor (Maybe String)

data Comp

Represents the different types of path components

Constructors

Fix String 
Var [String] 

Instances

Show Comp 

data CompOrSep

Used to represent parts of file names separated by slashes and spaces

Constructors

Slash 
Space 
Comp String 

Instances

Eq CompOrSep 
Show CompOrSep 

pathComponents :: [String] -> [Comp]

Function to turn a list of of strings into a list of path components

findFilesAndLabel :: [String] -> Maybe (String, String -> Int) -> Monitor [(String, Either Int (String, String -> Int))]

Function to find all files matching the given path and possible label file. The path must be absolute (start with a leading slash).

readFiles :: (String, Either Int (String, String -> Int)) -> Monitor (Int, String)

Function to read the contents of the given file(s)

ifthen :: a -> a -> Bool -> a

Function that captures if-then-else