diff options
author | Andrea Rossato <andrea.rossato@ing.unitn.it> | 2008-04-29 14:59:53 +0200 |
---|---|---|
committer | Andrea Rossato <andrea.rossato@ing.unitn.it> | 2008-04-29 14:59:53 +0200 |
commit | 4b73d3043896c2d759a60894bdfdadbc10d93bf4 (patch) | |
tree | 5ff75f2b73efa0f590e04a9b693606c2b8499814 /Commands.hs | |
parent | 661ba1eaf6f10dad7dcff79a326ebb5d22d012c6 (diff) | |
download | xmobar-4b73d3043896c2d759a60894bdfdadbc10d93bf4.tar.gz xmobar-4b73d3043896c2d759a60894bdfdadbc10d93bf4.tar.bz2 |
style, pointfree and trailing spaces0.9_release
darcs-hash:20080429125953-d6583-02a6653c15d3166ad264c45ec44082bdae30260e.gz
Diffstat (limited to 'Commands.hs')
-rw-r--r-- | Commands.hs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Commands.hs b/Commands.hs index 1be0677..5e03ad0 100644 --- a/Commands.hs +++ b/Commands.hs @@ -3,7 +3,7 @@ -- Module : Xmobar.Commands -- Copyright : (c) Andrea Rossato -- License : BSD-style (see LICENSE) --- +-- -- Maintainer : Andrea Rossato <andrea.rossato@unibz.it> -- Stability : unstable -- Portability : unportable @@ -13,11 +13,15 @@ -- The 'Exec' class rappresents the executable types, whose constructors may -- appear in the 'Config.commands' field of the 'Config.Config' data type. -- --- The 'Command' data type is for OS commands to be run by Xmobar +-- The 'Command' data type is for OS commands to be run by xmobar -- ----------------------------------------------------------------------------- -module Commands where +module Commands + ( Command (..) + , Exec (..) + , tenthSeconds + ) where import Control.Concurrent import Data.Char @@ -54,12 +58,12 @@ instance Exec Command where where go = do (i,o,e,p) <- runInteractiveCommand (prog ++ concat (map (' ':) args)) exit <- waitForProcess p - let closeHandles = do + let closeHandles = do hClose o hClose i hClose e case exit of - ExitSuccess -> do + ExitSuccess -> do str <- hGetLine o closeHandles cb str |