xmonad-contrib-0.18.0: Community-maintained extensions for xmonad
Copyright(c) 2021 Xiaokui Shu
LicenseBSD-style (see LICENSE)
Maintainersubbyte@gmail.com
Stabilityunstable
Portabilityunportable
Safe HaskellNone
LanguageHaskell2010

XMonad.Util.ActionQueue

Contents

Description

Put XMonad actions in the queue to be executed in either the logHook or another hook of your choice.

Synopsis

Usage

This module provides a queue that, by default, gets executed every time the logHook runs. To use this module

  1. Enqueue `X ()` actions at the place you need; e.g.:
enqueue myAction
  1. 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.

actionQueue :: forall (l :: Type -> Type). XConfig l -> XConfig l Source #

Every time the logHook runs, execute all actions in the queue.

enqueue :: X () -> X () Source #

Enqueue an action.

exequeue :: X () Source #

Execute every action in the queue.