summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorReto Habluetzel <rethab@rethab.ch>2012-08-29 23:16:54 +0200
committerReto Habluetzel <rethab@rethab.ch>2012-08-29 23:16:54 +0200
commit2cf7e19b8be5e892c03bd95cf4e1acffe0e53e66 (patch)
treeeb8c49c714feee6229c56c36be967b9511f32e4a /src
parenta9de120224fa1dbb1f740d3d51d8bde6432c0884 (diff)
downloadxmobar-2cf7e19b8be5e892c03bd95cf4e1acffe0e53e66.tar.gz
xmobar-2cf7e19b8be5e892c03bd95cf4e1acffe0e53e66.tar.bz2
cleaned up imports, renamed variable
Diffstat (limited to 'src')
-rw-r--r--src/Plugins/Monitors/Net.hs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Plugins/Monitors/Net.hs b/src/Plugins/Monitors/Net.hs
index 170da07..10ca9cc 100644
--- a/src/Plugins/Monitors/Net.hs
+++ b/src/Plugins/Monitors/Net.hs
@@ -22,7 +22,7 @@ import Plugins.Monitors.Common
import Data.IORef (IORef, newIORef, readIORef, writeIORef)
import Data.Time.Clock (UTCTime, getCurrentTime, diffUTCTime)
-import Control.Monad (forM, filterM, liftM)
+import Control.Monad (forM)
import qualified Data.ByteString.Lazy.Char8 as B
@@ -129,11 +129,9 @@ parseNets = mapM (\(ref, i) -> parseNet ref i)
runNets :: [(NetDevRef, String)] -> [String] -> Monitor String
runNets refs _ = io (parseActive refs) >>= printNet
- where parseActive refs = parseNets refs >>= return . selectActive
+ where parseActive refs' = parseNets refs' >>= return . selectActive
+ selectActive = maximum
-selectActive :: [NetDev] -> NetDev
-selectActive = maximum
-
startNet :: String -> [String] -> Int -> (String -> IO ()) -> IO ()
startNet i a r cb = do
t0 <- getCurrentTime