[XMonad] Move setWorkspaceName... to top level

This commit is contained in:
Ivan Malison 2016-10-20 17:58:58 -07:00
parent 80addc4ae9
commit 6674321419
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -44,12 +44,13 @@ main = xmonad $ ewmh $ pagerHints def
myLogHook = fadeInactiveLogHook 0.9
setWorkspaceNameToFocusedWindow workspace = do
namedWindows <- mapM getName $ take 2 $ W.integrate' $ W.stack workspace
setWorkspaceName (W.tag workspace) (concatMap show namedWindows)
automaticallySetWorkspaceNames = do
ws <- gets windowset
mapM_ setWorkspaceNameToFocusedWindow (W.workspaces ws)
where setWorkspaceNameToFocusedWindow workspace = do
namedWindows <- mapM getName $ take 2 $ W.integrate' $ W.stack workspace
setWorkspaceName (W.tag workspace) (concatMap show namedWindows)
shiftThenView i = W.greedyView i . W.shift i