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/Directory.hs | 2 +- XMonad/Prompt/Layout.hs | 9 ++++++--- XMonad/Prompt/Man.hs | 9 ++++----- XMonad/Prompt/Shell.hs | 9 +++------ XMonad/Prompt/Ssh.hs | 8 +++----- XMonad/Prompt/Window.hs | 19 ++++++++----------- XMonad/Prompt/Workspace.hs | 9 ++++++--- XMonad/Prompt/XMonad.hs | 13 +++++-------- 8 files changed, 36 insertions(+), 42 deletions(-) (limited to 'XMonad') diff --git a/XMonad/Prompt/Directory.hs b/XMonad/Prompt/Directory.hs index 1ceaab8..281d2cf 100644 --- a/XMonad/Prompt/Directory.hs +++ b/XMonad/Prompt/Directory.hs @@ -3,7 +3,7 @@ -- Module : XMonad.Prompt.Directory -- Copyright : (C) 2007 Andrea Rossato, David Roundy -- License : BSD3 --- +-- -- Maintainer : droundy@darcs.net -- Stability : unstable -- Portability : unportable diff --git a/XMonad/Prompt/Layout.hs b/XMonad/Prompt/Layout.hs index 3f55d06..beb3334 100644 --- a/XMonad/Prompt/Layout.hs +++ b/XMonad/Prompt/Layout.hs @@ -3,7 +3,7 @@ -- Module : XMonad.Prompt.Layout -- Copyright : (C) 2007 Andrea Rossato, David Roundy -- License : BSD3 --- +-- -- Maintainer : droundy@darcs.net -- Stability : unstable -- Portability : unportable @@ -27,13 +27,16 @@ import XMonad.StackSet ( workspaces, layout ) import XMonad.Layout.LayoutCombinators ( JumpToLayout(..) ) -- $usage --- You can use this module with the following in your Config.hs file: +-- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@: -- -- > import XMonad.Prompt -- > import XMonad.Prompt.Layout -- -- > , ((modMask x .|. shiftMask, xK_m ), layoutPrompt defaultXPConfig) - +-- +-- For detailed instruction on editing the key binding see +-- "XMonad.Doc.Extending#Editing_key_bindings". +-- -- WARNING: This prompt won't display all possible layouts, because the -- code to enable this was rejected from xmonad core. It only displays -- layouts that are actually in use. Also, you can only select layouts if diff --git a/XMonad/Prompt/Man.hs b/XMonad/Prompt/Man.hs index 35bc9a5..56d3532 100644 --- a/XMonad/Prompt/Man.hs +++ b/XMonad/Prompt/Man.hs @@ -40,7 +40,7 @@ import Data.List import Data.Maybe -- $usage --- 1. In Config.hs add: +-- 1. In your @~\/.xmonad\/xmonad.hs@: -- -- > import XMonad.Prompt -- > import XMonad.Prompt.Man @@ -48,10 +48,9 @@ import Data.Maybe -- 2. In your keybindings add something like: -- -- > , ((modMask x, xK_F1), manPrompt defaultXPConfig) - --- %import XMonad.Prompt --- %import XMonad.Prompt.Man --- %keybind , ((modMask x, xK_F1), manPrompt defaultXPConfig) +-- +-- For detailed instruction on editing the key binding see +-- "XMonad.Doc.Extending#Editing_key_bindings". data Man = Man diff --git a/XMonad/Prompt/Shell.hs b/XMonad/Prompt/Shell.hs index 5b46647..295c0fa 100644 --- a/XMonad/Prompt/Shell.hs +++ b/XMonad/Prompt/Shell.hs @@ -32,8 +32,7 @@ import XMonad hiding (config) import XMonad.Prompt -- $usage --- --- 1. In Config.hs add: +-- 1. In your @~\/.xmonad\/xmonad.hs@: -- -- > import XMonad.Prompt -- > import XMonad.Prompt.Shell @@ -42,10 +41,8 @@ import XMonad.Prompt -- -- > , ((modMask x .|. controlMask, xK_x), shellPrompt defaultXPConfig) -- - --- %import XMonad.Prompt --- %import XMonad.Prompt.Shell --- %keybind , ((modMask x .|. controlMask, xK_x), shellPrompt defaultXPConfig) +-- For detailed instruction on editing the key binding see +-- "XMonad.Doc.Extending#Editing_key_bindings". data Shell = Shell diff --git a/XMonad/Prompt/Ssh.hs b/XMonad/Prompt/Ssh.hs index 13577c6..4ac44c2 100644 --- a/XMonad/Prompt/Ssh.hs +++ b/XMonad/Prompt/Ssh.hs @@ -30,7 +30,7 @@ import Data.List import Data.Maybe -- $usage --- 1. In Config.hs add: +-- 1. In your @~\/.xmonad\/xmonad.hs@: -- -- > import XMonad.Prompt -- > import XMonad.Prompt.Ssh @@ -39,10 +39,8 @@ import Data.Maybe -- -- > , ((modMask x .|. controlMask, xK_s), sshPrompt defaultXPConfig) -- - --- %import XMonad.Prompt --- %import XMonad.Prompt.Ssh --- %keybind , ((modMask x .|. controlMask, xK_s), sshPrompt defaultXPConfig) +-- For detailed instruction on editing the key binding see +-- "XMonad.Doc.Extending#Editing_key_bindings". data Ssh = Ssh 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 diff --git a/XMonad/Prompt/Workspace.hs b/XMonad/Prompt/Workspace.hs index a83d933..343774b 100644 --- a/XMonad/Prompt/Workspace.hs +++ b/XMonad/Prompt/Workspace.hs @@ -3,7 +3,7 @@ -- Module : XMonad.Prompt.Workspace -- Copyright : (C) 2007 Andrea Rossato, David Roundy -- License : BSD3 --- +-- -- Maintainer : droundy@darcs.net -- Stability : unstable -- Portability : unportable @@ -25,12 +25,15 @@ import XMonad.Prompt import XMonad.StackSet ( workspaces, tag ) -- $usage --- You can use this module with the following in your Config.hs file: --- +-- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@: +-- -- > import XMonad.Prompt -- > import XMonad.Prompt.Workspace -- -- > , ((modMask x .|. shiftMask, xK_m ), workspacePrompt defaultXPConfig (windows . W.shift)) +-- +-- For detailed instruction on editing the key binding see +-- "XMonad.Doc.Extending#Editing_key_bindings". data Wor = Wor String diff --git a/XMonad/Prompt/XMonad.hs b/XMonad/Prompt/XMonad.hs index fde7b8c..992c011 100644 --- a/XMonad/Prompt/XMonad.hs +++ b/XMonad/Prompt/XMonad.hs @@ -3,7 +3,7 @@ -- Module : XMonad.Prompt.XMonad -- Copyright : (C) 2007 Andrea Rossato -- License : BSD3 --- +-- -- Maintainer : andrea.rossato@unibz.it -- Stability : unstable -- Portability : unportable @@ -24,8 +24,7 @@ import XMonad.Prompt import XMonad.Actions.Commands (defaultCommands, runCommand') -- $usage --- --- in Config.hs add: +-- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@: -- -- > import XMonad.Prompt -- > import XMonad.Prompt.XMonad @@ -34,10 +33,8 @@ import XMonad.Actions.Commands (defaultCommands, runCommand') -- -- > , ((modMask x .|. controlMask, xK_x), xmonadPrompt defaultXPConfig) -- - --- %import XMonad.Prompt --- %import XMonad.Prompt.XMonad --- %keybind , ((modMask x .|. controlMask, xK_x), xmonadPrompt defaultXPConfig) +-- For detailed instruction on editing the key binding see +-- "XMonad.Doc.Extending#Editing_key_bindings". data XMonad = XMonad @@ -49,6 +46,6 @@ xmonadPrompt c = do cmds <- defaultCommands mkXPrompt XMonad c (mkComplFunFromList (map fst cmds)) runCommand' --- xmonad prompt with custom command list +-- | An xmonad prompt with a custom command list xmonadPromptC :: [(String, X ())] -> XPConfig -> X () xmonadPromptC commands c = mkXPrompt XMonad c (mkComplFunFromList (map fst commands)) runCommand' -- cgit v1.2.3