Change A.TopicSpace haddocks to use block quotes.

This commit is contained in:
Adam Vogt 2009-11-11 01:32:41 +00:00
parent 60ae62e4e3
commit 8dcd818586

View File

@ -77,129 +77,108 @@ import XMonad.Util.ExtensibleState
-- $usage -- $usage
-- Here is an example of configuration using TopicSpace: -- Here is an example of configuration using TopicSpace:
-- --
-- @ -- > -- The list of all topics/workspaces of your xmonad configuration.
-- -- The list of all topics/workspaces of your xmonad configuration. -- > -- The order is important, new topics must be inserted
-- -- The order is important, new topics must be inserted -- > -- at the end of the list if you want hot-restarting
-- -- at the end of the list if you want hot-restarting -- > -- to work.
-- -- to work. -- > myTopics :: [Topic]
-- myTopics :: [Topic] -- > myTopics =
-- myTopics = -- > [ "dashboard" -- the first one
-- [ \"dashboard\" -- the first one -- > , "admin", "build", "cleaning", "conf", "darcs", "haskell", "irc"
-- , \"admin\", \"build\", \"cleaning\", \"conf\", \"darcs\", \"haskell\", \"irc\" -- > , "mail", "movie", "music", "talk", "text", "tools", "web", "xmonad"
-- , \"mail\", \"movie\", \"music\", \"talk\", \"text\", \"tools\", \"web\", \"xmonad\" -- > , "yi", "documents", "twitter", "pdf"
-- , \"yi\", \"documents\", \"twitter\", \"pdf\" -- > ]
-- ] -- >
-- @ -- > myTopicConfig :: TopicConfig
-- -- > myTopicConfig = defaultTopicConfig
-- @ -- > { topicDirs = M.fromList $
-- myTopicConfig :: TopicConfig -- > [ ("conf", "w/conf")
-- myTopicConfig = TopicConfig -- > , ("dashboard", "Desktop")
-- { topicDirs = M.fromList $ -- > , ("yi", "w/dev-haskell/yi")
-- [ (\"conf\", \"w\/conf\") -- > , ("darcs", "w/dev-haskell/darcs")
-- , (\"dashboard\", \"Desktop\") -- > , ("haskell", "w/dev-haskell")
-- , (\"yi\", \"w\/dev-haskell\/yi\") -- > , ("xmonad", "w/dev-haskell/xmonad")
-- , (\"darcs\", \"w\/dev-haskell\/darcs\") -- > , ("tools", "w/tools")
-- , (\"haskell\", \"w\/dev-haskell\") -- > , ("movie", "Movies")
-- , (\"xmonad\", \"w\/dev-haskell\/xmonad\") -- > , ("talk", "w/talks")
-- , (\"tools\", \"w\/tools\") -- > , ("music", "Music")
-- , (\"movie\", \"Movies\") -- > , ("documents", "w/documents")
-- , (\"talk\", \"w\/talks\") -- > , ("pdf", "w/documents")
-- , (\"music\", \"Music\") -- > ]
-- , (\"documents\", \"w\/documents\") -- > , defaultTopicAction = const $ spawnShell >*> 3
-- , (\"pdf\", \"w\/documents\") -- > , defaultTopic = "dashboard"
-- ] -- > , topicActions = M.fromList $
-- , defaultTopicAction = const $ spawnShell >*> 3 -- > [ ("conf", spawnShell >> spawnShellIn "wd/ertai/private")
-- , defaultTopic = \"dashboard\" -- > , ("darcs", spawnShell >*> 3)
-- , maxTopicHistory = 10 -- > , ("yi", spawnShell >*> 3)
-- , topicActions = M.fromList $ -- > , ("haskell", spawnShell >*> 2 >>
-- [ (\"conf\", spawnShell >> spawnShellIn \"wd\/ertai\/private\") -- > spawnShellIn "wd/dev-haskell/ghc")
-- , (\"darcs\", spawnShell >*> 3) -- > , ("xmonad", spawnShellIn "wd/x11-wm/xmonad" >>
-- , (\"yi\", spawnShell >*> 3) -- > spawnShellIn "wd/x11-wm/xmonad/contrib" >>
-- , (\"haskell\", spawnShell >*> 2 >> -- > spawnShellIn "wd/x11-wm/xmonad/utils" >>
-- spawnShellIn \"wd\/dev-haskell\/ghc\") -- > spawnShellIn ".xmonad" >>
-- , (\"xmonad\", spawnShellIn \"wd\/x11-wm\/xmonad\" >> -- > spawnShellIn ".xmonad")
-- spawnShellIn \"wd\/x11-wm\/xmonad\/contrib\" >> -- > , ("mail", mailAction)
-- spawnShellIn \"wd\/x11-wm\/xmonad\/utils\" >> -- > , ("irc", ssh somewhere)
-- spawnShellIn \".xmonad\" >> -- > , ("admin", ssh somewhere >>
-- spawnShellIn \".xmonad\") -- > ssh nowhere)
-- , (\"mail\", mailAction) -- > , ("dashboard", spawnShell)
-- , (\"irc\", ssh somewhere) -- > , ("twitter", spawnShell)
-- , (\"admin\", ssh somewhere >> -- > , ("web", spawn browserCmd)
-- ssh nowhere) -- > , ("movie", spawnShell)
-- , (\"dashboard\", spawnShell) -- > , ("documents", spawnShell >*> 2 >>
-- , (\"twitter\", spawnShell) -- > spawnShellIn "Documents" >*> 2)
-- , (\"web\", spawn browserCmd) -- > , ("pdf", spawn pdfViewerCmd)
-- , (\"movie\", spawnShell) -- > ]
-- , (\"documents\", spawnShell >*> 2 >> -- > }
-- spawnShellIn \"Documents\" >*> 2) -- >
-- , (\"pdf\", spawn pdfViewerCmd) -- > -- extend your keybindings
-- ] -- > myKeys conf@XConfig{modMask=modm} =
-- } -- > [ ((modm , xK_n ), spawnShell) -- %! Launch terminal
-- @ -- > , ((modm , xK_a ), currentTopicAction myTopicConfig)
-- -- > , ((modm , xK_g ), promptedGoto)
-- @ -- > , ((modm .|. shiftMask, xK_g ), promptedShift)
-- -- extend your keybindings -- > {- more keys ... -}
-- myKeys conf\@XConfig{modMask=modm} = -- > ]
-- [ ((modm , xK_n ), spawnShell) -- %! Launch terminal -- > ++
-- , ((modm , xK_a ), currentTopicAction myTopicConfig) -- > [ ((modm, k), switchNthLastFocused myTopicConfig i)
-- , ((modm , xK_g ), promptedGoto) -- > | (i, k) <- zip [1..] workspaceKeys]
-- , ((modm .|. shiftMask, xK_g ), promptedShift) -- >
-- ... -- > spawnShell :: X ()
-- ] -- > spawnShell = currentTopicDir myTopicConfig >>= spawnShellIn
-- ++ -- >
-- [ ((modm, k), switchNthLastFocused myTopicConfig i) -- > spawnShellIn :: Dir -> X ()
-- | (i, k) <- zip [1..] workspaceKeys] -- > spawnShellIn dir = spawn $ "urxvt '(cd ''" ++ dir ++ "'' && " ++ myShell ++ " )'"
-- @ -- >
-- -- > goto :: Topic -> X ()
-- @ -- > goto = switchTopic myTopicConfig
-- spawnShell :: X () -- >
-- spawnShell = currentTopicDir myTopicConfig >>= spawnShellIn -- > promptedGoto :: X ()
-- @ -- > promptedGoto = workspacePrompt myXPConfig goto
-- -- >
-- @ -- > promptedShift :: X ()
-- spawnShellIn :: Dir -> X () -- > promptedShift = workspacePrompt myXPConfig $ windows . W.shift
-- spawnShellIn dir = spawn $ \"urxvt '(cd ''\" ++ dir ++ \"'' && \" ++ myShell ++ \" )'\" -- >
-- @ -- > myConfig = do
-- -- > checkTopicConfig myTopics myTopicConfig
-- @ -- > myLogHook <- makeMyLogHook
-- goto :: Topic -> X () -- > return $ defaultConfig
-- goto = switchTopic myTopicConfig -- > { borderWidth = 1 -- Width of the window border in pixels.
-- @ -- > , workspaces = myTopics
-- -- > , layoutHook = myModifiers myLayout
-- @ -- > , manageHook = myManageHook
-- promptedGoto :: X () -- > , logHook = myLogHook
-- promptedGoto = workspacePrompt myXPConfig goto -- > , handleEventHook = myHandleEventHook
-- @ -- > , terminal = myTerminal -- The preferred terminal program.
-- -- > , normalBorderColor = "#3f3c6d"
-- @ -- > , focusedBorderColor = "#4f66ff"
-- promptedShift :: X () -- > , XMonad.modMask = mod1Mask
-- promptedShift = workspacePrompt myXPConfig $ windows . W.shift -- > , keys = myKeys
-- @ -- > , mouseBindings = myMouseBindings
-- -- > }
-- @ -- >
-- myConfig = do -- > main :: IO ()
-- checkTopicConfig myTopics myTopicConfig -- > main = xmonad =<< myConfig
-- myLogHook <- makeMyLogHook
-- return $ defaultConfig
-- { borderWidth = 1 -- Width of the window border in pixels.
-- , workspaces = myTopics
-- , layoutHook = myModifiers myLayout
-- , manageHook = myManageHook
-- , logHook = myLogHook
-- , handleEventHook = myHandleEventHook
-- , terminal = myTerminal -- The preferred terminal program.
-- , normalBorderColor = \"#3f3c6d\"
-- , focusedBorderColor = \"#4f66ff\"
-- , XMonad.modMask = mod1Mask
-- , keys = myKeys
-- , mouseBindings = myMouseBindings
-- }
-- @
--
-- @
-- main :: IO ()
-- main = xmonad =<< myConfig
-- @
-- | An alias for @flip replicateM_@ -- | An alias for @flip replicateM_@
(>*>) :: Monad m => m a -> Int -> m () (>*>) :: Monad m => m a -> Int -> m ()