summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2011-01-04 21:49:08 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2011-01-04 21:49:08 +0100
commit4578f0f05de2ad73dffc15b998420b0351693b2b (patch)
tree411d3b5692db2735e4e4145d74521a3f5f361044 /src/Plugins
parent63d1501764968f3af864f7d16eb89301f9ee8875 (diff)
downloadxmobar-4578f0f05de2ad73dffc15b998420b0351693b2b.tar.gz
xmobar-4578f0f05de2ad73dffc15b998420b0351693b2b.tar.bz2
Linting
Diffstat (limited to 'src/Plugins')
-rw-r--r--src/Plugins/Monitors/Batt.hs24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/Plugins/Monitors/Batt.hs b/src/Plugins/Monitors/Batt.hs
index 102f635..e42049f 100644
--- a/src/Plugins/Monitors/Batt.hs
+++ b/src/Plugins/Monitors/Batt.hs
@@ -76,10 +76,10 @@ battConfig = mkMConfig
["leftbar", "left", "acstatus", "timeleft", "watts"] -- replacements
data Files = Files
- { f_full :: String
- , f_now :: String
- , f_voltage :: String
- , f_current :: String
+ { fFull :: String
+ , fNow :: String
+ , fVoltage :: String
+ , fCurrent :: String
} | NoFiles
data Battery = Battery
@@ -98,10 +98,10 @@ batteryFiles bat =
(_, True) -> files "/energy"
_ -> NoFiles
where prefix = base ++ "/" ++ bat
- files ch = Files { f_full = prefix ++ ch ++ "_full"
- , f_now = prefix ++ ch ++ "_now"
- , f_current = prefix ++ "/current_now"
- , f_voltage = prefix ++ "/voltage_now" }
+ files ch = Files { fFull = prefix ++ ch ++ "_full"
+ , fNow = prefix ++ ch ++ "_now"
+ , fCurrent = prefix ++ "/current_now"
+ , fVoltage = prefix ++ "/voltage_now" }
haveAc :: FilePath -> IO Bool
haveAc f = do
@@ -114,10 +114,10 @@ haveAc f = do
readBattery :: Files -> IO Battery
readBattery NoFiles = return $ Battery 0 0 0 0
readBattery files =
- do a <- grab $ f_full files -- microwatthours
- b <- grab $ f_now files
- c <- grab $ f_voltage files -- microvolts
- d <- grab $ f_current files -- microwatts (huh!)
+ do a <- grab $ fFull files -- microwatthours
+ b <- grab $ fNow files
+ c <- grab $ fVoltage files -- microvolts
+ d <- grab $ fCurrent files -- microwatts (huh!)
return $ Battery (3600 * a / 1000000) -- wattseconds
(3600 * b / 1000000) -- wattseconds
(c / 1000000) -- volts