Copyright | (c) Ben Boeckel 2012 |
---|---|
License | BSD-style (as xmonad) |
Maintainer | mathstuf@gmail.com |
Stability | unstable |
Portability | unportable |
Safe Haskell | None |
Language | Haskell98 |
Manage per-screen status bars.
- type DynamicStatusBar = ScreenId -> IO Handle
- type DynamicStatusBarCleanup = IO ()
- dynStatusBarStartup :: DynamicStatusBar -> DynamicStatusBarCleanup -> X ()
- dynStatusBarEventHook :: DynamicStatusBar -> DynamicStatusBarCleanup -> Event -> X All
- multiPP :: PP -> PP -> X ()
Usage
Provides a few helper functions to manage per-screen status bars while dynamically responding to screen changes. A startup action, event hook, and a way to separate PP styles based on the screen's focus are provided:
- The
dynStatusBarStartup
hook which initializes the status bars. - The
dynStatusBarEventHook
hook which respawns status bars when the number of screens changes. - The
multiPP
function which allows for different output based on whether the screen for the status bar has focus.
The hooks take a DynamicStatusBar
function which is given the id of the
screen to start up and returns the Handle
to the pipe to write to. The
DynamicStatusBarCleanup
argument should tear down previous instances. It
is called when the number of screens changes and on startup.
type DynamicStatusBar = ScreenId -> IO Handle Source
type DynamicStatusBarCleanup = IO () Source