xmonad-contrib-0.12: Third party extensions for xmonad

Copyright(C) 2015 Antoine Beaupré
LicenseBSD3
MaintainerAntoine Beaupré <anarcat@debian.org>
Stabilityunstable
Portabilityunportable
Safe HaskellNone
LanguageHaskell98

XMonad.Prompt.ConfirmPrompt

Contents

Description

A module for setting up simple confirmation prompts for keybindings.

Synopsis

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.

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