| Copyright | (c) Brandon S Allbery KF8NH 2014 |
|---|---|
| License | BSD3-style (see LICENSE) |
| Maintainer | allbery.b@gmail.com |
| Stability | unstable |
| Portability | not portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
XMonad.Hooks.ManageDebug
Description
A manageHook and associated logHook for debugging ManageHooks.
Simplest usage: wrap your xmonad config in the debugManageHook combinator.
Or use debugManageHookOn for a triggerable version, specifying the
triggering key sequence in XMonad.Util.EZConfig syntax. Or use the
individual hooks in whatever way you see fit.
Synopsis
- debugManageHook :: XConfig l -> XConfig l
- debugManageHookOn :: String -> XConfig l -> XConfig l
- manageDebug :: ManageHook
- manageDebug' :: Handle -> Bool -> ManageHook
- maybeManageDebug :: ManageHook
- manageDebugLogHook :: X ()
- debugNextManagedWindow :: X ()
Documentation
debugManageHook :: XConfig l -> XConfig l Source #
A combinator to add full ManageHook debugging in a single operation.
debugManageHookOn :: String -> XConfig l -> XConfig l Source #
A combinator to add triggerable ManageHook debugging in a single operation.
Specify a key sequence as a string in XMonad.Util.EZConfig syntax; press
this key before opening the window to get just that logged.
manageDebug :: ManageHook Source #
Place this at the start of a ManageHook, or possibly other places for a
more limited view. It will show the current StackSet state and the new
window, and set a flag so that manageDebugLogHook will display the
final StackSet state.
Note that the initial state shows only the current workspace; the final
one shows all workspaces, since your manageHook might use e.g. doShift.
This logs to stderr because there's no way to pass it a message handle,
and to maintain backward compatibility. See manageDebug' for an
alternative that accepts a Handle.
manageDebug' :: Handle -> Bool -> ManageHook Source #
manageDebug to a Handle. The flag specifies whether the Handle should
be closed after logging. debugNextManagedWindow uses this to log to
xmessage, but it can be used to log to any chosen process or file.
Logging is incremental, so if your Handle is to something that can show
output before the logHook prints the final StackSet and optionally
closes it, you can see it before it completes.
You should be careful to pass False if you are logging to stdout or
stderr, and to pass True if you are logging to a process. Also remember
that xmonad subprocesses are auto-reaped, so don't try to wait for one.
maybeManageDebug :: ManageHook Source #
manageDebug only if the user requested it with debugNextManagedWindow.
manageDebugLogHook :: X () Source #
If manageDebug' has set the debug-stack flag, show the stack.
debugNextManagedWindow :: X () Source #
Request that the next window to be managed be manageDebug-ed. This can
be used anywhere an X action can, such as key bindings, mouse bindings
(presumably with const), startupHook, etc. The output is sent to
'$XMONAD_XMESSAGE' or xmessage.