| Portability | unportable |
|---|---|
| Stability | unstable |
| Maintainer | Braden.Shepherdson@gmail.com |
| Safe Haskell | None |
XMonad.Hooks.DynamicHooks
Contents
Description
One-shot and permanent ManageHooks that can be updated at runtime.
- dynamicMasterHook :: ManageHook
- addDynamicHook :: ManageHook -> X ()
- updateDynamicHook :: (ManageHook -> ManageHook) -> X ()
- oneShotHook :: Query Bool -> ManageHook -> X ()
Usage
Provides two new kinds of ManageHooks that can be defined at runtime.
- One-shot
ManageHooksthat are deleted after they execute. - Permanent
ManageHooks(unless you want to destroy them)
Note that you will lose all dynamically defined ManageHooks when you mod+q!
If you want them to last, you should create them as normal in your xmonad.hs.
To use this module, add dynamicMasterHook to your manageHook:
xmonad { manageHook = myManageHook <+> dynamicMasterHook }
You can then use the supplied functions in your keybindings:
((modMask,xK_a), oneShotHook (className =? "example") doFloat)
dynamicMasterHook :: ManageHookSource
Master ManageHook that must be in your xmonad.hs ManageHook.
addDynamicHook :: ManageHook -> X ()Source
Appends the given ManageHook to the permanent dynamic ManageHook.
updateDynamicHook :: (ManageHook -> ManageHook) -> X ()Source
Modifies the permanent ManageHook with an arbitrary function.
oneShotHook :: Query Bool -> ManageHook -> X ()Source
Creates a one-shot ManageHook. Note that you have to specify the two
parts of the ManageHook separately. Where you would usually write:
className =? "example" --> doFloat
you must call oneShotHook as
oneShotHook dynHooksRef (className =? "example) doFloat