module Confirm (confirm) where import Control.Monad import XMonad.Core import XMonad.Actions.GridSelect confirm :: GSConfig Bool -> String -> X() -> X() confirm config string action = do res <- gridselect config [(string, True), ("No", False)] whenJust res (\x -> when x action)