From 649c4e081e27bdfa220c3b3e83f151a63da944d2 Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Wed, 21 Nov 2007 15:27:15 +0100 Subject: Updated documentation of all prompts in XMonad.Prompt darcs-hash:20071121142715-32816-d7bc698f2a035139bf7a512af20804c872b6d467.gz --- XMonad/Prompt/Window.hs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'XMonad/Prompt/Window.hs') diff --git a/XMonad/Prompt/Window.hs b/XMonad/Prompt/Window.hs index 5829138..b286bcd 100644 --- a/XMonad/Prompt/Window.hs +++ b/XMonad/Prompt/Window.hs @@ -17,7 +17,7 @@ module XMonad.Prompt.Window ( -- * Usage - -- $usage + -- $usage windowPromptGoto, windowPromptBring ) where @@ -36,7 +36,7 @@ import XMonad.Actions.WindowBringer -- That is to say, it pops up a prompt with window names, in case you forgot -- where you left your XChat. -- --- Place in your Config.hs: +-- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@: -- -- > import XMonad.Prompt -- > import XMonad.Prompt.Window @@ -45,15 +45,12 @@ import XMonad.Actions.WindowBringer -- -- > , ((modMask x .|. shiftMask, xK_g ), windowPromptGoto defaultXPConfig) -- > , ((modMask x .|. shiftMask, xK_b ), windowPromptBring defaultXPConfig) - --- %import XMonad.Prompt --- %import XMonad.Prompt.Window --- %keybind , ((modMask x .|. shiftMask, xK_g ), windowPromptGoto defaultXPConfig) --- %keybind , ((modMask x .|. shiftMask, xK_b ), windowPromptBring defaultXPConfig) - +-- +-- For detailed instruction on editing the key binding see +-- "XMonad.Doc.Extending#Editing_key_bindings". data WindowPrompt = Goto | Bring -instance XPrompt WindowPrompt where +instance XPrompt WindowPrompt where showXPrompt Goto = "Go to window: " showXPrompt Bring = "Bring me here: " @@ -66,14 +63,14 @@ windowPromptBring c = doPrompt Bring c doPrompt :: WindowPrompt -> XPConfig -> X () doPrompt t c = do a <- case t of - Goto -> return . gotoAction =<< windowMapWith (W.tag . fst) + Goto -> return . gotoAction =<< windowMapWith (W.tag . fst) Bring -> return . bringAction =<< windowMapWith snd wm <- windowMapWith id mkXPrompt t c (compList wm) a where - winAction a m = flip whenJust (windows . a) . flip M.lookup m . unescape + winAction a m = flip whenJust (windows . a) . flip M.lookup m . unescape gotoAction = winAction W.greedyView bringAction = winAction bringWindow bringWindow w ws = W.shiftWin (W.tag . W.workspace . W.current $ ws) w ws -- cgit v1.2.3