| Portability | unportable |
|---|---|
| Stability | unstable |
| Maintainer | mathstuf@gmail.com |
| Safe Haskell | None |
XMonad.Hooks.DynamicBars
Contents
Description
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
dynStatusBarStartuphook which initializes the status bars. - The
dynStatusBarEventHookhook which respawns status bars when the number of screens changes. - The
multiPPfunction 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 HandleSource
type DynamicStatusBarCleanup = IO ()Source