xmonad-contrib-0.17.0.9: Community-maintained extensions for xmonad
Copyright(c) Braden Shepherdson 2008
LicenseBSD-style (as xmonad)
MaintainerBraden.Shepherdson@gmail.com
Stabilityunstable
Portabilityunportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

XMonad.Hooks.DynamicHooks

Contents

Description

One-shot and permanent ManageHooks that can be updated at runtime.

Synopsis

Usage

Provides two new kinds of ManageHooks that can be defined at runtime.

  • One-shot ManageHooks that 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 :: ManageHook Source #

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