| |||||||||
| |||||||||
| |||||||||
| 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.
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. First, you must execute initDynamicHooks from main in your xmonad.hs: dynHooksRef <- initDynamicHooks and then pass this value to the other functions in this module. You also need to add the base ManageHook: xmonad { manageHook = myManageHook <+> dynamicMasterHook dynHooksRef }
You must include this dynHooksRef value when using the functions in this module: xmonad { keys = myKeys `Data.Map.union` Data.Map.fromList
[((modm, xK_i), oneShotHook dynHooksRef
"FFlaunchHook" (className =? "firefox") (doShift "3")
>> spawn "firefox")
,((modm, xK_u), addDynamicHook dynHooksRef
(className =? "example" --> doFloat))
,((modm, xK_y), updatePermanentHook dynHooksRef
(const idHook))) ] -- resets the permanent hook.
| |||||||||
| initDynamicHooks :: IO (IORef DynamicHooks) | |||||||||
| Creates the IORef that stores the dynamically created ManageHooks. | |||||||||
| dynamicMasterHook :: IORef DynamicHooks -> ManageHook | |||||||||
| Master ManageHook that must be in your xmonad.hs ManageHook. | |||||||||
| addDynamicHook :: IORef DynamicHooks -> ManageHook -> X () | |||||||||
| Appends the given ManageHook to the permanent dynamic ManageHook. | |||||||||
| updateDynamicHook :: IORef DynamicHooks -> (ManageHook -> ManageHook) -> X () | |||||||||
| Modifies the permanent ManageHook with an arbitrary function. | |||||||||
| oneShotHook :: IORef DynamicHooks -> Query Bool -> ManageHook -> X () | |||||||||
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 | |||||||||
| Produced by Haddock version 2.7.2 |