xmobar 0.3 → 0.3.1
raw patch · 3 files changed
+12/−6 lines, 3 files
Files
- XMobar.hs +10/−4
- xmobar.cabal +1/−1
- xmobar.config-sample +1/−1
XMobar.hs view
@@ -84,7 +84,7 @@ ps <- io $ parseString c i drawInWin ps -- back again: we are never ending- io $ threadDelay $ 100000 * refresh c+ io $ tenthSeconds (refresh c) eventLoop -- | The function to create the initial window@@ -191,7 +191,7 @@ runCommandLoop var conf c@(s,com,ss) | com == "" = do modifyMVar_ var (\_ -> return $ "Could not parse the template")- threadDelay (100000 * (refresh conf))+ tenthSeconds (refresh conf) runCommandLoop var conf c | otherwise = do (i,o,e,p) <- runInteractiveCommand (com ++ concat (map (' ':) $ getOptions conf com))@@ -205,11 +205,11 @@ ExitSuccess -> do str <- hGetLine o closeHandles modifyMVar_ var (\_ -> return $ s ++ str ++ ss)- threadDelay (100000 * (getRefRate conf com))+ tenthSeconds (getRefRate conf com) runCommandLoop var conf c _ -> do closeHandles modifyMVar_ var $ \_ -> return $ "Could not execute command " ++ com- threadDelay (100000 * (getRefRate conf com))+ tenthSeconds (getRefRate conf com) runCommandLoop var conf c @@ -260,3 +260,9 @@ -- | Short-hand for lifting in the IO monad io :: IO a -> Xbar a io = liftIO++tenthSeconds :: Int -> IO ()+tenthSeconds s =+ threadDelay n+ where n | (maxBound :: Int) `div` 100000 <= s = (maxBound :: Int)+ | otherwise = s * 100000
xmobar.cabal view
@@ -1,5 +1,5 @@ name: xmobar-version: 0.3+version: 0.3.1 homepage: http://gorgias.mine.nu/repos/xmobar/ synopsis: A Statusbar for the XMonad Window Manager description: Xmobar is a minimal status bar for the XMonad Window Manager.
xmobar.config-sample view
@@ -7,7 +7,7 @@ , hight = 15 , align = "right" , refresh = 10- , commands = [("xmb-weather", 36000, ["EGXD"]), ("xmb-net", 10, ["eth1"])]+ , commands = [("xmb-weather", 36000, ["EGPF"]), ("xmb-net", 10, ["eth1"])] , sepChar = "%" , template = "%xmb-cpu% %xmb-mem% %xmb-net% | %xmb-weather% | <fc=#ee9a00>%date%</fc>" }