From 1849649ed4b7cd8f6c64f3cd087ae42a9b5c4415 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 10 Nov 2016 21:08:45 -0800 Subject: [PATCH] [XMonad] Move maybeUnminimizeAfter calls to focus functions --- dotfiles/xmonad/xmonad.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index c502da49..f2e386a8 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -47,8 +47,7 @@ main = xmonad $ def , terminal = "urxvt" , manageHook = manageDocks <+> myManageHook <+> manageHook def , layoutHook = myLayoutHook - , logHook = toggleFadeInactiveLogHook 0.9 +++ ewmhWorkspaceNamesLogHook +++ - maybeUnminimizeFocused + , logHook = toggleFadeInactiveLogHook 0.9 +++ ewmhWorkspaceNamesLogHook , handleEventHook = docksEventHook <+> fullscreenEventHook +++ ewmhDesktopsEventHook +++ pagerHintsEventHook , startupHook = myStartup +++ ewmhWorkspaceNamesLogHook @@ -216,6 +215,8 @@ windowIsMinimized w = do maybeUnminimizeFocused = withFocused $ \w -> windowIsMinimized w >>= flip when (maximizeWindow w) +maybeUnminimizeAfter = (>> maybeUnminimizeFocused) + restoreAllMinimized = restoreFocus $ withLastMinimized $ \w -> maximizeWindow w >> restoreAllMinimized @@ -238,8 +239,8 @@ shiftToEmptyAndView = doTo Next EmptyWS DWO.getSortByOrder (windows . shiftThenV -- Raise or spawn -myRaiseNextMaybe = raiseNextMaybeCustomFocus greedyFocusWindow -myBringNextMaybe = raiseNextMaybeCustomFocus bringWindow +myRaiseNextMaybe = (maybeUnminimizeAfter .) . raiseNextMaybeCustomFocus greedyFocusWindow +myBringNextMaybe = (maybeUnminimizeAfter .) . raiseNextMaybeCustomFocus bringWindow bindBringAndRaise :: KeyMask -> KeySym -> X () -> Query Bool -> [((KeyMask, KeySym), X ())] bindBringAndRaise mask sym start query =