diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2010-12-11 14:19:42 -0500 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2010-12-11 14:19:42 -0500 |
commit | 096aee3a1667e056fe906967cc2b078e8122e2b4 (patch) | |
tree | 10cb45f45433596d2abc271618553c7e4663f644 /Plugins/Monitors/Cpu.hs | |
parent | 6ac13d70d701bc6f0e8a24ef4fa67e501403fe81 (diff) | |
download | xmobar-096aee3a1667e056fe906967cc2b078e8122e2b4.tar.gz xmobar-096aee3a1667e056fe906967cc2b078e8122e2b4.tar.bz2 |
Use `head' rather than `flip (!!) 0'
Diffstat (limited to 'Plugins/Monitors/Cpu.hs')
-rw-r--r-- | Plugins/Monitors/Cpu.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Plugins/Monitors/Cpu.hs b/Plugins/Monitors/Cpu.hs index fb5e9e2..ab89246 100644 --- a/Plugins/Monitors/Cpu.hs +++ b/Plugins/Monitors/Cpu.hs @@ -28,7 +28,7 @@ cpuData = do s <- B.readFile "/proc/stat" cpuParser :: B.ByteString -> [Float] cpuParser = - map (read . B.unpack) . tail . B.words . flip (!!) 0 . B.lines + map (read . B.unpack) . tail . B.words . head . B.lines parseCPU :: IO [Float] parseCPU = |