Copyright | (c) 2021 Xiaokui Shu |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | subbyte@gmail.com |
Stability | unstable |
Portability | unportable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Put XMonad actions in the queue to be executed in either the
logHook
or another hook of your choice.
Synopsis
- data ActionQueue
- actionQueue :: XConfig l -> XConfig l
- enqueue :: X () -> X ()
- exequeue :: X ()
Usage
This module provides a queue that, by default, gets executed every
time the logHook
runs. To use this module
- Enqueue `X ()` actions at the place you need; e.g.:
enqueue myAction
- Add the
actionQueue
combinator to your configuration:
main = xmonad $ actionQueue $ def { ... }
This will execute all of the actions in the queue (if any) every time
the logHook
runs. Developers of other extensions using this module
should re-export actionQueue
.
Alternatively, you can directly add exequeue
to a hook of your choice.
This is discouraged when writing user-facing modules, as (accidentally)
adding exequeue
to two different hooks might lead to undesirable
behaviour. actionQueue
uses the XMonad.Util.ExtensibleConf interface to
circumvent this.
data ActionQueue Source #
Instances
ExtensionClass ActionQueue Source # | |
Defined in XMonad.Util.ActionQueue |
actionQueue :: XConfig l -> XConfig l Source #
Every time the logHook
runs, execute all actions in the queue.