Copyright | (C) 2015 Antoine Beaupré |
---|---|
License | BSD3 |
Maintainer | Antoine Beaupré <anarcat@debian.org> |
Stability | unstable |
Portability | unportable |
Safe Haskell | None |
Language | Haskell98 |
A module for setting up simple confirmation prompts for keybindings.
- confirmPrompt :: XPConfig -> String -> X () -> X ()
- module XMonad.Prompt
- data EnterPrompt
Documentation
confirmPrompt :: XPConfig -> String -> X () -> X () Source
Prompt the user to confirm a given action. We offer no completion and simply ask to confirm (ENTER) or cancel (ESCAPE). The actual key handling is done by mkXPrompt.
Usage
This module makes it easy to add a confirmation prompt for specific
actions. Instead of just running the action, a simple confirmation
prompt will be created using Prompt
primitives. The action
will then run normally if the user confirms.
module XMonad.Prompt
Use case: confirming exit
This should be used something like this:
... , ((modm , xK_l), confirmPrompt defaultXPConfig "exit" $ io (exitWith ExitSuccess)) ...
data EnterPrompt Source
Customized XPrompt
prompt that will ask to confirm the given string