diff options
author | David Roundy <droundy@darcs.net> | 2008-03-27 15:22:57 +0100 |
---|---|---|
committer | David Roundy <droundy@darcs.net> | 2008-03-27 15:22:57 +0100 |
commit | 4d96055b6b3dc29ccd2a7ad69cdb035accbb06b5 (patch) | |
tree | f789814b963d2150101d25cc1d5aae4a13df35b5 /XMonad | |
parent | 6fe913b76c6ea706e243cd535136a67107396ce4 (diff) | |
download | XMonadContrib-4d96055b6b3dc29ccd2a7ad69cdb035accbb06b5.tar.gz XMonadContrib-4d96055b6b3dc29ccd2a7ad69cdb035accbb06b5.tar.xz XMonadContrib-4d96055b6b3dc29ccd2a7ad69cdb035accbb06b5.zip |
corrected version of make workspaceDir work even in workspaces with no windows.
darcs-hash:20080327142257-72aca-66c0810038f4d401ac7e579e7c6d334de6074c50.gz
Diffstat (limited to 'XMonad')
-rw-r--r-- | XMonad/Layout/WorkspaceDir.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/XMonad/Layout/WorkspaceDir.hs b/XMonad/Layout/WorkspaceDir.hs index f550f46..1820237 100644 --- a/XMonad/Layout/WorkspaceDir.hs +++ b/XMonad/Layout/WorkspaceDir.hs @@ -37,7 +37,7 @@ import XMonad.Util.Run ( runProcessWithInput ) import XMonad.Prompt ( XPConfig ) import XMonad.Prompt.Directory ( directoryPrompt ) import XMonad.Layout.LayoutModifier -import XMonad.StackSet ( Stack, peek, focus ) +import XMonad.StackSet ( tag, current, workspace ) -- $usage -- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@: @@ -69,9 +69,9 @@ instance Message Chdir data WorkspaceDir a = WorkspaceDir String deriving ( Read, Show ) instance LayoutModifier WorkspaceDir Window where - redoLayout (WorkspaceDir d) _ s wrs = do w <- gets windowset - when (Just (focus s) == peek w) $ scd d - return (wrs, Nothing) + modifyLayout (WorkspaceDir d) w r = do tc <- gets (tag.workspace.current.windowset) + when (tc == tag w) $ scd d + runLayout w r handleMess (WorkspaceDir _) m | Just (Chdir wd) <- fromMessage m = do wd' <- cleanDir wd return $ Just $ WorkspaceDir wd' |