mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
DynamicWorkspaces: haddock updates
This commit is contained in:
parent
760a240af1
commit
98840048e5
@ -33,11 +33,13 @@ import XMonad.Prompt.Workspace
|
||||
import XMonad.Prompt ( XPConfig, mkXPrompt, XPrompt(..) )
|
||||
|
||||
-- $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@ file:
|
||||
--
|
||||
-- > import XMonad.Actions.DynamicWorkspaces
|
||||
--
|
||||
-- > , ((modMask .|. shiftMask, xK_BackSpace), removeWorkspace)
|
||||
-- Then add keybindings like the following:
|
||||
--
|
||||
-- > , ((modMask x .|. shiftMask, xK_BackSpace), removeWorkspace)
|
||||
-- > , ((modMask x .|. shiftMask, xK_v ), selectWorkspace defaultXPConfig)
|
||||
-- > , ((modMask x, xK_m ), withWorkspace defaultXPConfig (windows . W.shift))
|
||||
-- > , ((modMask x .|. shiftMask, xK_m ), withWorkspace defaultXPConfig (windows . copy))
|
||||
@ -46,9 +48,13 @@ import XMonad.Prompt ( XPConfig, mkXPrompt, XPrompt(..) )
|
||||
-- > -- mod-[1..9] %! Switch to workspace N
|
||||
-- > -- mod-shift-[1..9] %! Move client to workspace N
|
||||
-- > ++
|
||||
-- > zip (zip (repeat modMask) [xK_1..xK_9]) (map (withNthWorkspace W.greedyView) [0..])
|
||||
-- > zip (zip (repeat (modMask x)) [xK_1..xK_9]) (map (withNthWorkspace W.greedyView) [0..])
|
||||
-- > ++
|
||||
-- > zip (zip (repeat (modMask .|. shiftMask)) [xK_1..xK_9]) (map (withNthWorkspace W.shift) [0..])
|
||||
-- > zip (zip (repeat (modMask x .|. shiftMask)) [xK_1..xK_9]) (map (withNthWorkspace W.shift) [0..])
|
||||
--
|
||||
-- For detailed instructions on editing your key bindings, see
|
||||
-- "XMonad.Doc.Extending#Editing_key_bindings".
|
||||
|
||||
|
||||
data Wor = Wor String
|
||||
|
||||
@ -91,6 +97,7 @@ selectWorkspace conf = workspacePrompt conf $ \w ->
|
||||
then windows $ greedyView w
|
||||
else addWorkspace w
|
||||
|
||||
-- | Add a new workspace with the given name.
|
||||
addWorkspace :: String -> X ()
|
||||
addWorkspace newtag = addHiddenWorkspace newtag >> windows (greedyView newtag)
|
||||
|
||||
@ -98,6 +105,7 @@ addHiddenWorkspace :: String -> X ()
|
||||
addHiddenWorkspace newtag = do l <- asks (layoutHook . config)
|
||||
windows (addHiddenWorkspace' newtag l)
|
||||
|
||||
-- | Remove the current workspace if it contains no windows.
|
||||
removeWorkspace :: X ()
|
||||
removeWorkspace = do s <- gets windowset
|
||||
case s of
|
||||
|
Loading…
x
Reference in New Issue
Block a user