From c02771714f47d9eca3d5aa143ef7e4850207b847 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 9 Sep 2017 19:40:44 -0700 Subject: [PATCH] [XMonad] Remove dynamic workspace naming --- dotfiles/xmonad/xmonad.hs | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index d4270c2f..8fbb8353 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -365,7 +365,6 @@ myLayoutHook = mkToggle1 GAPS . mkToggle1 MAGICFOCUS . mkToggle1 NBFULL . - workspaceNamesHook . lessBorders Screen $ fst layoutInfo -- WindowBringer @@ -456,35 +455,7 @@ myReplaceWindow = myWindowAct myWindowBringerConfig $ chromeTabAction True (windows . swapFocusedWith) --- Dynamic Workspace Renaming -windowClassFontAwesomeFile = - fmap ( ".lib/resources/window_class_to_fontawesome.json") getHomeDirectory - -getClassRemap = - fmap (fromMaybe M.empty . decode) $ - windowClassFontAwesomeFile >>= B.readFile - -getClassRemapF = flip maybeRemap <$> getClassRemap -getWSClassNames' w = mapM getClass $ W.integrate' $ W.stack w -getWSClassNames w = io (fmap map getClassRemapF) <*> getWSClassNames' w -currentWSName ws = fromMaybe "" <$> (getWorkspaceNames' <$$> W.tag ws) -desiredWSName = (intercalate "|" <$>) . getWSClassNames - -setWorkspaceNameToFocusedWindow workspace = do - currentName <- currentWSName workspace - newName <- desiredWSName workspace - when (currentName /= newName) $ setWorkspaceName (W.tag workspace) newName - -setWorkspaceNames = - gets windowset >>= mapM_ setWorkspaceNameToFocusedWindow . W.workspaces - -data WorkspaceNamesHook a = WorkspaceNamesHook deriving (Show, Read) - -instance LayoutModifier WorkspaceNamesHook Window where - hook _ = setWorkspaceNames - -workspaceNamesHook = ModifiedLayout WorkspaceNamesHook -- Toggleable fade