From 7321f83a46fd28db9c8e8b914d75d10466780281 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 26 Oct 2016 16:47:18 -0700 Subject: [PATCH] [XMonad] Handle setting visible workspaces for renames --- dotfiles/xmonad/xmonad.hs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index cc55fe58..ed7b6ce5 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -8,7 +8,7 @@ import Data.Maybe import Graphics.X11.ExtraTypes.XF86 import System.Directory import System.FilePath.Posix -import System.Taffybar.Hooks.PagerHints (pagerHints) +import System.Taffybar.Hooks.PagerHints import Text.Printf import XMonad hiding ( (|||) ) @@ -35,13 +35,13 @@ import XMonad.Util.CustomKeys import qualified XMonad.Util.ExtensibleState as XS import XMonad.Util.NamedWindows (getName) -main = xmonad $ pagerHints def +main = xmonad $ def { modMask = mod4Mask , terminal = "urxvt" , manageHook = manageDocks <+> myManageHook <+> manageHook def , layoutHook = myLayoutHook , logHook = fadeInactiveLogHook 0.9 +++ ewmhWorkspaceNamesLogHook - , handleEventHook = docksEventHook <+> fullscreenEventHook +++ ewmhDesktopsEventHook + , handleEventHook = docksEventHook <+> fullscreenEventHook +++ ewmhDesktopsEventHook +++ pagerHintsEventHook , startupHook = myStartup +++ ewmhWorkspaceNamesLogHook , keys = customKeys (const []) addKeys } where @@ -52,7 +52,7 @@ isHangoutsTitle = isPrefixOf "Google Hangouts" chromeSelector = className =? "google-chrome" <&&> fmap (not . isHangoutsTitle) title spotifySelector = className =? "Spotify" emacsSelector = className =? "Emacs" -hangoutsSelector = className =? "google-chrome" <&&> fmap (isHangoutsTitle) title +hangoutsSelector = className =? "google-chrome" <&&> fmap isHangoutsTitle title -- Startup @@ -66,8 +66,6 @@ myManageHook = composeAll . concat $ , [ hangoutsSelector --> doShift "1"] , [ spotifySelector --> doShift "2"]] - - -- Layout layouts = multiCol [1, 1] 2 0.01 (-0.5) ||| Full ||| Tall 1 (3/100) (1/2) ||| Tall 1 (3/100) (3/4) @@ -127,7 +125,9 @@ workspaceNamesHook = ModifiedLayout WorkspaceNamesHook ewmhWorkspaceNamesLogHook = do WorkspaceNames namesMap <- XS.get - ewmhDesktopsLogHookCustom id (getWorkspaceNameFromTag namesMap) + let tagRemapping = getWorkspaceNameFromTag namesMap + pagerHintsLogHookCustom tagRemapping + ewmhDesktopsLogHookCustom id tagRemapping getWorkspaceNameFromTag namesMap tag = case M.lookup tag namesMap of