diff --git a/dotfiles/xmonad/stack.yaml b/dotfiles/xmonad/stack.yaml index d9bab1ad..d22dea7f 100644 --- a/dotfiles/xmonad/stack.yaml +++ b/dotfiles/xmonad/stack.yaml @@ -4,7 +4,7 @@ packages: - '.' - location: git: git@github.com:IvanMalison/xmonad-contrib.git - commit: 1bcb7a31f662cb06dd0e1c51da666694d9ad1836 + commit: e4fc2341b6c5e4c27f309a371bfc140c70d813b4 - location: git: git@github.com:IvanMalison/taffybar.git commit: 39e3a95e9c2eae37ff8b67eaa31bbd18503859b1 diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index 24175e90..418b2847 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -49,13 +49,17 @@ import XMonad.Util.NamedScratchpad (NamedScratchpad(NS), nonFloating, namedScratchpadAction) import XMonad.Util.NamedWindows (getName) +myGetWorkspaceNameFromTag getWSName tag = + printf "%s: %s " tag (fromMaybe "(Empty)" (getWSName tag)) + main = xmonad $ def { modMask = mod4Mask , terminal = "urxvt" , manageHook = manageDocks <+> myManageHook <+> manageHook def , layoutHook = myLayoutHook - , logHook = toggleFadeInactiveLogHook 0.9 +++ ewmhWorkspaceNamesLogHook + , logHook = toggleFadeInactiveLogHook 0.9 +++ ewmhWorkspaceNamesLogHook' myGetWorkspaceNameFromTag +++ + (myGetWorkspaceNameFromTag <$> getWorkspaceNames' >>= pagerHintsLogHookCustom) , handleEventHook = docksEventHook <+> fullscreenEventHook +++ ewmhDesktopsEventHook +++ pagerHintsEventHook +++ followIfNoMagicFocus @@ -300,17 +304,6 @@ instance LayoutModifier WorkspaceNamesHook Window where workspaceNamesHook = ModifiedLayout WorkspaceNamesHook --- EWMH support for workspace names - -ewmhWorkspaceNamesLogHook = do - getWSName <- getWorkspaceNames' - let tagRemapping = getWorkspaceNameFromTag getWSName - pagerHintsLogHookCustom tagRemapping - ewmhDesktopsLogHookCustom id tagRemapping - -getWorkspaceNameFromTag getWSName tag = - printf "%s: %s " tag (fromMaybe "(Empty)" (getWSName tag)) - -- Toggleable fade newtype ToggleFade a = @@ -335,7 +328,7 @@ toggleFadeInactiveLogHook = fadeIf (isUnfocused <&&> fadeEnabledForWindow <&&> fadeEnabledForWorkspace) toggleFadingForActiveWindow = withWindowSet $ - maybe (return()) toggleFadingForWindow . W.peek + maybe (return ()) toggleFadingForWindow . W.peek toggleFadingForActiveWorkspace = withWindowSet $ \ws -> toggleFadingForWindow $ W.currentTag ws