From 66743214194f117dd266db327ed35f926db17c42 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 20 Oct 2016 17:58:58 -0700 Subject: [PATCH] [XMonad] Move setWorkspaceName... to top level --- dotfiles/xmonad/xmonad.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index a12a2c41..2a0c6a03 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -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