diff options
author | David Roundy <droundy@darcs.net> | 2007-11-01 19:35:46 +0100 |
---|---|---|
committer | David Roundy <droundy@darcs.net> | 2007-11-01 19:35:46 +0100 |
commit | c11e5cf01047ccb4c3d5fb7057a3366289f3ac20 (patch) | |
tree | 4c0383132d8f65f700ef2757629db47b4a90bb78 /XMonad | |
parent | 4866f2e367dfcf22a9591231ba40948826a1b438 (diff) | |
download | XMonadContrib-c11e5cf01047ccb4c3d5fb7057a3366289f3ac20.tar.gz XMonadContrib-c11e5cf01047ccb4c3d5fb7057a3366289f3ac20.tar.xz XMonadContrib-c11e5cf01047ccb4c3d5fb7057a3366289f3ac20.zip |
fix selectWorkspace to work with new config.
darcs-hash:20071101183546-72aca-01f90fa9b4a7b2b3b1b8ea2f22088d1490d07978.gz
Diffstat (limited to 'XMonad')
-rw-r--r-- | XMonad/Actions/DynamicWorkspaces.hs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/XMonad/Actions/DynamicWorkspaces.hs b/XMonad/Actions/DynamicWorkspaces.hs index 6aa3fb9..855467a 100644 --- a/XMonad/Actions/DynamicWorkspaces.hs +++ b/XMonad/Actions/DynamicWorkspaces.hs @@ -21,10 +21,11 @@ module XMonad.Actions.DynamicWorkspaces ( toNthWorkspace, withNthWorkspace ) where +import Control.Monad.Reader ( asks ) import Control.Monad.State ( gets ) import Data.List ( sort ) -import XMonad ( X, XState(..), Layout, WorkspaceId, WindowSet ) +import XMonad ( X, XState(..), Layout, WorkspaceId, WindowSet, config, layoutHook ) import XMonad.Operations import XMonad.StackSet hiding (filter, modify, delete) import Graphics.X11.Xlib ( Window ) @@ -36,7 +37,7 @@ import XMonad.Prompt ( XPConfig ) -- -- > import XMonad.Actions.DynamicWorkspaces -- --- > , ((modMask .|. shiftMask, xK_n), selectWorkspace defaultXPConfig layoutHook) +-- > , ((modMask .|. shiftMask, xK_n), selectWorkspace defaultXPConfig) -- > , ((modMask .|. shiftMask, xK_BackSpace), removeWorkspace) -- > , ((modMask .|. shiftMask .|. controlMask, xK_r), renameWorkspace defaultXPConfig) -- @@ -69,11 +70,12 @@ withNthWorkspace job wnum = do ws <- gets (sort . map tag . workspaces . windows (w:_) -> windows $ job w [] -> return () -selectWorkspace :: XPConfig -> Layout Window -> X () -selectWorkspace conf l = workspacePrompt conf $ \w -> - windows $ \s -> if tagMember w s - then greedyView w s - else addWorkspace' w l s +selectWorkspace :: XPConfig -> X () +selectWorkspace conf = workspacePrompt conf $ \w -> + do l <- asks (layoutHook . config) + windows $ \s -> if tagMember w s + then greedyView w s + else addWorkspace' w l s addWorkspace :: Layout Window -> X () addWorkspace l = do s <- gets windowset |