diff options
author | Andrea Rossato <andrea.rossato@ing.unitn.it> | 2007-07-17 11:14:38 +0200 |
---|---|---|
committer | Andrea Rossato <andrea.rossato@ing.unitn.it> | 2007-07-17 11:14:38 +0200 |
commit | c2b98fd88acba773135167454422ff68c85e2f49 (patch) | |
tree | b34ebf398db597872cbc8f41ee04c13c9e32cacd /Xmobar.hs | |
parent | 6d21a15b2563c8e6f84e1a6fbc6f6b6eb3439cd0 (diff) | |
download | xmobar-c2b98fd88acba773135167454422ff68c85e2f49.tar.gz xmobar-c2b98fd88acba773135167454422ff68c85e2f49.tar.bz2 |
changed runXmobar to runXbar
darcs-hash:20070717091438-d6583-cd772f86e2296bf7de4780425819d3d04d502a6e.gz
Diffstat (limited to 'Xmobar.hs')
-rw-r--r-- | Xmobar.hs | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -16,7 +16,7 @@ module Xmobar (-- * Main Stuff -- $main Xbar - , runXmobar + , runXbar , eventLoop , createWin -- * Printing @@ -53,7 +53,7 @@ import Runnable -- -- The Xmobar data type and basic loops and functions. --- | This is just esthetics, stolen from XMonad: see 'runXmobar' +-- | This is copied from XMonad. newtype Xbar a = X (ReaderT Config (StateT XState IO) a) deriving (Functor, Monad, MonadIO, MonadState XState, MonadReader Config) @@ -64,11 +64,10 @@ data XState = , vars :: [(ThreadId, MVar String)] } --- | Totally useless: but it is nice to be able to use get to get the --- state and ask to get the configuration: functions requires less --- arguments, after all. -runXmobar :: Config -> [(ThreadId, MVar String)] -> Display -> Window -> Xbar () -> IO () -runXmobar c v d w (X f) = +-- | We use get to get the state and ask to get the configuration: whis way +-- functions requires less arguments. +runXbar :: Config -> [(ThreadId, MVar String)] -> Display -> Window -> Xbar () -> IO () +runXbar c v d w (X f) = do runStateT (runReaderT f c) (XState d w v) return () |