xmonad-contrib 0.9 → 0.9.1
raw patch · 7 files changed
+122/−136 lines, 7 filesdep ~X11dep ~xmonad
Dependency ranges changed: X11, xmonad
Files
- XMonad/Actions/TopicSpace.hs +102/−123
- XMonad/Actions/WindowGo.hs +5/−4
- XMonad/Config/Desktop.hs +1/−1
- XMonad/Hooks/DynamicLog.hs +9/−3
- XMonad/Hooks/ManageHelpers.hs +1/−1
- XMonad/Util/Run.hs +2/−2
- xmonad-contrib.cabal +2/−2
XMonad/Actions/TopicSpace.hs view
@@ -74,129 +74,108 @@ -- $usage -- Here is an example of configuration using TopicSpace: ----- @--- -- The list of all topics/workspaces of your xmonad configuration.--- -- The order is important, new topics must be inserted--- -- at the end of the list if you want hot-restarting--- -- to work.--- myTopics :: [Topic]--- myTopics =--- [ \"dashboard\" -- the first one--- , \"admin\", \"build\", \"cleaning\", \"conf\", \"darcs\", \"haskell\", \"irc\"--- , \"mail\", \"movie\", \"music\", \"talk\", \"text\", \"tools\", \"web\", \"xmonad\"--- , \"yi\", \"documents\", \"twitter\", \"pdf\"--- ]--- @------ @--- myTopicConfig :: TopicConfig--- myTopicConfig = TopicConfig--- { topicDirs = M.fromList $--- [ (\"conf\", \"w\/conf\")--- , (\"dashboard\", \"Desktop\")--- , (\"yi\", \"w\/dev-haskell\/yi\")--- , (\"darcs\", \"w\/dev-haskell\/darcs\")--- , (\"haskell\", \"w\/dev-haskell\")--- , (\"xmonad\", \"w\/dev-haskell\/xmonad\")--- , (\"tools\", \"w\/tools\")--- , (\"movie\", \"Movies\")--- , (\"talk\", \"w\/talks\")--- , (\"music\", \"Music\")--- , (\"documents\", \"w\/documents\")--- , (\"pdf\", \"w\/documents\")--- ]--- , defaultTopicAction = const $ spawnShell >*> 3--- , defaultTopic = \"dashboard\"--- , maxTopicHistory = 10--- , topicActions = M.fromList $--- [ (\"conf\", spawnShell >> spawnShellIn \"wd\/ertai\/private\")--- , (\"darcs\", spawnShell >*> 3)--- , (\"yi\", spawnShell >*> 3)--- , (\"haskell\", spawnShell >*> 2 >>--- spawnShellIn \"wd\/dev-haskell\/ghc\")--- , (\"xmonad\", spawnShellIn \"wd\/x11-wm\/xmonad\" >>--- spawnShellIn \"wd\/x11-wm\/xmonad\/contrib\" >>--- spawnShellIn \"wd\/x11-wm\/xmonad\/utils\" >>--- spawnShellIn \".xmonad\" >>--- spawnShellIn \".xmonad\")--- , (\"mail\", mailAction)--- , (\"irc\", ssh somewhere)--- , (\"admin\", ssh somewhere >>--- ssh nowhere)--- , (\"dashboard\", spawnShell)--- , (\"twitter\", spawnShell)--- , (\"web\", spawn browserCmd)--- , (\"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)--- ...--- ]--- ++--- [ ((modm, k), switchNthLastFocused myTopicConfig i)--- | (i, k) <- zip [1..] workspaceKeys]--- @------ @--- spawnShell :: X ()--- spawnShell = currentTopicDir myTopicConfig >>= spawnShellIn--- @------ @--- spawnShellIn :: Dir -> X ()--- spawnShellIn dir = spawn $ \"urxvt '(cd ''\" ++ dir ++ \"'' && \" ++ myShell ++ \" )'\"--- @------ @--- goto :: Topic -> X ()--- goto = switchTopic myTopicConfig--- @------ @--- promptedGoto :: X ()--- promptedGoto = workspacePrompt myXPConfig goto--- @------ @--- promptedShift :: X ()--- promptedShift = workspacePrompt myXPConfig $ windows . W.shift--- @------ @--- myConfig = do--- checkTopicConfig myTopics myTopicConfig--- 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--- @+-- > -- The list of all topics/workspaces of your xmonad configuration.+-- > -- The order is important, new topics must be inserted+-- > -- at the end of the list if you want hot-restarting+-- > -- to work.+-- > myTopics :: [Topic]+-- > myTopics =+-- > [ "dashboard" -- the first one+-- > , "admin", "build", "cleaning", "conf", "darcs", "haskell", "irc"+-- > , "mail", "movie", "music", "talk", "text", "tools", "web", "xmonad"+-- > , "yi", "documents", "twitter", "pdf"+-- > ]+-- >+-- > myTopicConfig :: TopicConfig+-- > myTopicConfig = defaultTopicConfig+-- > { topicDirs = M.fromList $+-- > [ ("conf", "w/conf")+-- > , ("dashboard", "Desktop")+-- > , ("yi", "w/dev-haskell/yi")+-- > , ("darcs", "w/dev-haskell/darcs")+-- > , ("haskell", "w/dev-haskell")+-- > , ("xmonad", "w/dev-haskell/xmonad")+-- > , ("tools", "w/tools")+-- > , ("movie", "Movies")+-- > , ("talk", "w/talks")+-- > , ("music", "Music")+-- > , ("documents", "w/documents")+-- > , ("pdf", "w/documents")+-- > ]+-- > , defaultTopicAction = const $ spawnShell >*> 3+-- > , defaultTopic = "dashboard"+-- > , topicActions = M.fromList $+-- > [ ("conf", spawnShell >> spawnShellIn "wd/ertai/private")+-- > , ("darcs", spawnShell >*> 3)+-- > , ("yi", spawnShell >*> 3)+-- > , ("haskell", spawnShell >*> 2 >>+-- > spawnShellIn "wd/dev-haskell/ghc")+-- > , ("xmonad", spawnShellIn "wd/x11-wm/xmonad" >>+-- > spawnShellIn "wd/x11-wm/xmonad/contrib" >>+-- > spawnShellIn "wd/x11-wm/xmonad/utils" >>+-- > spawnShellIn ".xmonad" >>+-- > spawnShellIn ".xmonad")+-- > , ("mail", mailAction)+-- > , ("irc", ssh somewhere)+-- > , ("admin", ssh somewhere >>+-- > ssh nowhere)+-- > , ("dashboard", spawnShell)+-- > , ("twitter", spawnShell)+-- > , ("web", spawn browserCmd)+-- > , ("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)+-- > {- more keys ... -}+-- > ]+-- > +++-- > [ ((modm, k), switchNthLastFocused myTopicConfig i)+-- > | (i, k) <- zip [1..] workspaceKeys]+-- >+-- > spawnShell :: X ()+-- > spawnShell = currentTopicDir myTopicConfig >>= spawnShellIn+-- >+-- > spawnShellIn :: Dir -> X ()+-- > spawnShellIn dir = spawn $ "urxvt '(cd ''" ++ dir ++ "'' && " ++ myShell ++ " )'"+-- >+-- > goto :: Topic -> X ()+-- > goto = switchTopic myTopicConfig+-- >+-- > promptedGoto :: X ()+-- > promptedGoto = workspacePrompt myXPConfig goto+-- >+-- > promptedShift :: X ()+-- > promptedShift = workspacePrompt myXPConfig $ windows . W.shift+-- >+-- > myConfig = do+-- > checkTopicConfig myTopics myTopicConfig+-- > 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_@ (>*>) :: Monad m => m a -> Int -> m ()
XMonad/Actions/WindowGo.hs view
@@ -58,9 +58,10 @@ (Note that Firefox v3 and up have a class-name of \"Firefox\" and \"Navigator\"; lower versions use other classnames such as \"Firefox-bin\". Either choose the-appropriate one, or cover your bases by using instead something like- @(className =? \"Firefox\" <||> className =? \"Firefox-bin\")@.)+appropriate one, or cover your bases by using instead something like: +> (className =? "Firefox" <||> className =? "Firefox-bin")+ For detailed instructions on editing your key bindings, see "XMonad.Doc.Extending#Editing_key_bindings". -} @@ -171,14 +172,14 @@ {- | if the window is found the window is focused and set to master otherwise, the first argument is called. - > raiseMaster (runInTerm \"-title ghci\" \"zsh -c \'ghci\'\") (title =? \"ghci\") -}+ > raiseMaster (runInTerm "-title ghci" "zsh -c 'ghci'") (title =? "ghci") -} raiseMaster :: X () -> Query Bool -> X () raiseMaster raisef thatUserQuery = raiseAndDo raisef thatUserQuery (\_ -> windows W.swapMaster) {- | If the window is found the window is focused and set to master otherwise, action is run. - > runOrRaiseMaster \"firefox\" (className =? \"Firefox\"))+ > runOrRaiseMaster "firefox" (className =? "Firefox")) -} runOrRaiseMaster :: String -> Query Bool -> X () runOrRaiseMaster run query = runOrRaiseAndDo run query (\_ -> windows W.swapMaster)
XMonad/Config/Desktop.hs view
@@ -89,7 +89,7 @@ -- $customizing -- To customize a desktop config, modify its fields as is illustrated with--- @defaultConfig@ in the \"Extending xmonad\" section of "XMonad.Doc.Extending".+-- @defaultConfig@ in "XMonad.Doc.Extending#Extending xmonad". -- $layouts -- See also "XMonad.Util.EZConfig" for more options for modifying key bindings.
XMonad/Hooks/DynamicLog.hs view
@@ -81,7 +81,9 @@ -- If you just want a quick-and-dirty status bar with zero effort, try -- the 'xmobar' or 'dzen' functions: ----- > main = xmonad =<< xmobar conf+-- > main = xmonad =<< xmobar myConfig+-- >+-- > myConfig = defaultConfig { ... } -- -- There is also 'statusBar' if you'd like to use another status bar, or would -- like to use different formatting options. The 'xmobar', 'dzen', and@@ -144,7 +146,9 @@ -- | Run xmonad with a dzen status bar set to some nice defaults. ----- > main = xmonad =<< dzen conf+-- > main = xmonad =<< dzen myConfig+-- >+-- > myConfig = defaultConfig { ... } -- -- The intent is that the above config file should provide a nice -- status bar with minimal effort.@@ -167,7 +171,9 @@ -- | Run xmonad with a xmobar status bar set to some nice defaults. ----- > main = xmonad =<< xmobar conf+-- > main = xmonad =<< xmobar myConfig+-- >+-- > myConfig = defaultConfig { ... } -- -- This works pretty much the same as 'dzen' function above. --
XMonad/Hooks/ManageHelpers.hs view
@@ -56,7 +56,7 @@ import System.Posix (ProcessID) --- | Denotes a side of a screen. @S@ stands for South, @NE@ for Northwest+-- | Denotes a side of a screen. @S@ stands for South, @NE@ for Northeast -- etc. @C@ stands for Center. data Side = SC | NC | CE | CW | SE | SW | NE | NW | C deriving (Read, Show, Eq)
XMonad/Util/Run.hs view
@@ -51,8 +51,7 @@ -- For an example usage of 'runProcessWithInputAndWait' see -- "XMonad.Util.Dzen" --- | Return output if the command succeeded, otherwise return @()@.--- This corresponds to dmenu's notion of exit code 1 for a canceled invocation.+-- | Returns the output. runProcessWithInput :: FilePath -> [String] -> String -> IO String runProcessWithInput cmd args input = do (pin, pout, perr, _) <- runInteractiveProcess cmd args Nothing Nothing@@ -141,4 +140,5 @@ uninstallSignalHandlers dupTo rd stdInput executeFile "/bin/sh" False ["-c", x] Nothing+ closeFd rd return h
xmonad-contrib.cabal view
@@ -1,5 +1,5 @@ name: xmonad-contrib-version: 0.9+version: 0.9.1 homepage: http://xmonad.org/ synopsis: Third party extensions for xmonad description:@@ -49,7 +49,7 @@ extensions: ForeignFunctionInterface cpp-options: -DXFT - build-depends: mtl, unix, X11>=1.4.6.1, xmonad>=0.9, xmonad<1, utf8-string+ build-depends: mtl, unix, X11>=1.5.0.0 && < 1.6, xmonad>=0.9.1, xmonad<0.10, utf8-string ghc-options: -fwarn-tabs -Wall extensions: ForeignFunctionInterface