taffybar-3.0.0: A desktop bar similar to xmobar, but with more GUI

Copyright | (c) José A. Romero L.
License | BSD3-style (see LICENSE)
Maintainer | José A. Romero L. <escherdragon@gmail.com>
Stability | unstable
Portability | unportable
Safe Haskell | Safe
Language | Haskell2010

System.Taffybar.Information.CPU2

Description

Provides information about used CPU times, obtained from parsing the `/proc/stat` file using some of the facilities included in the System.Taffybar.Information.StreamInfo module. And also provides information about the temperature of cores. (Now supports only physical cpu).

Synopsis

- getCPUInfo :: String -> IO [Int]
- parse :: String -> [(String, [Int])]
- tuplize :: [String] -> Maybe (String, [Int])
- getCPULoad :: String -> IO [Double]
- getCPUTemperatureDirectory :: IO FilePath
- readCPUTempFile :: FilePath -> IO Double
- getAllTemperatureFiles :: FilePath -> IO [FilePath]
- getCPUTemperatures :: IO [(String, Double)]

# Documentation

getCPUInfo :: String -> IO [Int] Source #

Returns a list of 5 to 7 elements containing all the values available for the given core (or all of them aggregated, if "cpu" is passed).

parse :: String -> [(String, [Int])] Source #

tuplize :: [String] -> Maybe (String, [Int]) Source #

getCPULoad :: String -> IO [Double] Source #

Returns a two-element list containing relative system and user times calculated using two almost simultaneous samples of the `/proc/stat` file for the given core (or all of them aggregated, if "cpu" is passed).

getCPUTemperatureDirectory :: IO FilePath Source #

Get the directory in which core temperature files are kept.

readCPUTempFile :: FilePath -> IO Double Source #

getAllTemperatureFiles :: FilePath -> IO [FilePath] Source #

getCPUTemperatures :: IO [(String, Double)] Source #