aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--XMonad/Actions/DynamicWorkspaces.hs13
1 files changed, 8 insertions, 5 deletions
diff --git a/XMonad/Actions/DynamicWorkspaces.hs b/XMonad/Actions/DynamicWorkspaces.hs
index 893dbf7..4451591 100644
--- a/XMonad/Actions/DynamicWorkspaces.hs
+++ b/XMonad/Actions/DynamicWorkspaces.hs
@@ -23,6 +23,7 @@ module XMonad.Actions.DynamicWorkspaces (
addHiddenWorkspace,
withWorkspace,
selectWorkspace, renameWorkspace,
+ renameWorkspaceByName,
toNthWorkspace, withNthWorkspace
) where
@@ -73,11 +74,13 @@ withWorkspace c job = do ws <- gets (workspaces . windowset)
mkXPrompt (Wor "") c (mkCompl ts) job'
renameWorkspace :: XPConfig -> X ()
-renameWorkspace conf = workspacePrompt conf $ \w ->
- windows $ \s -> let sett wk = wk { tag = w }
- setscr scr = scr { workspace = sett $ workspace scr }
- sets q = q { current = setscr $ current q }
- in sets $ removeWorkspace' w s
+renameWorkspace conf = workspacePrompt conf renameWorkspaceByName
+
+renameWorkspaceByName :: String -> X ()
+renameWorkspaceByName w = windows $ \s -> let sett wk = wk { tag = w }
+ setscr scr = scr { workspace = sett $ workspace scr }
+ sets q = q { current = setscr $ current q }
+ in sets $ removeWorkspace' w s
toNthWorkspace :: (String -> X ()) -> Int -> X ()
toNthWorkspace job wnum = do sort <- getSortByIndex