diff options
author | Don Stewart <dons@cse.unsw.edu.au> | 2007-03-08 13:26:13 +0100 |
---|---|---|
committer | Don Stewart <dons@cse.unsw.edu.au> | 2007-03-08 13:26:13 +0100 |
commit | fc7791f96abe49af78c3d6ae1be86bd933dffa1d (patch) | |
tree | 3de2c25f67d8f01c8e842c3154928d1eee0e5abe /WMonad.hs | |
parent | fbae7e44a693103919fb2393016249dc059eef16 (diff) | |
download | metatile-fc7791f96abe49af78c3d6ae1be86bd933dffa1d.tar metatile-fc7791f96abe49af78c3d6ae1be86bd933dffa1d.zip |
refactoring. heads up: depends on withServer in X11-extras
darcs-hash:20070308122613-9c5c1-9d1492a54b2186edcc3c6c5f178254a00a969a6c
Diffstat (limited to 'WMonad.hs')
-rw-r--r-- | WMonad.hs | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -67,6 +67,18 @@ trace msg = io $ do hPutStrLn stderr msg hFlush stderr +-- | Run a monad action with the current display settings +withDisplay :: (Display -> W ()) -> W () +withDisplay f = gets display >>= f + +-- | Run a monadic action with the display, screen width and height +withScreen :: ((Display,Int,Int) -> W ()) -> W () +withScreen f = do + d <- gets display + sw <- gets screenWidth + sh <- gets screenHeight + f (d,sw,sh) + -- | Modify the workspace list. modifyWorkspace :: (WorkSpace -> WorkSpace) -> W () modifyWorkspace f = do |