[XMonad] Improve automatic unminimization

This commit is contained in:
Ivan Malison 2016-11-11 12:13:31 -08:00
parent ca0508b9ba
commit 02015d45e0
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -229,7 +229,9 @@ maybeUnminimize w = windowIsMinimized w >>= flip when (maximizeWindow w)
maybeUnminimizeFocused = withFocused maybeUnminimize maybeUnminimizeFocused = withFocused maybeUnminimize
maybeUnminimizeAfter = (>> maximizeSameClassesInWorkspace) maybeUnminimizeAfter = (>> maybeUnminimizeFocused)
maybeUnminimizeClassAfter = (>> maximizeSameClassesInWorkspace)
restoreAllMinimized = restoreFocus $ restoreAllMinimized = restoreFocus $
withLastMinimized $ \w -> maximizeWindow w >> restoreAllMinimized withLastMinimized $ \w -> maximizeWindow w >> restoreAllMinimized
@ -252,7 +254,7 @@ shiftToEmptyAndView = doTo Next EmptyWS DWO.getSortByOrder (windows . shiftThenV
-- Raise or spawn -- Raise or spawn
myRaiseNextMaybe = (maybeUnminimizeAfter .) . raiseNextMaybeCustomFocus greedyFocusWindow myRaiseNextMaybe = (maybeUnminimizeClassAfter .) . raiseNextMaybeCustomFocus greedyFocusWindow
myBringNextMaybe = (maybeUnminimizeAfter .) . raiseNextMaybeCustomFocus bringWindow myBringNextMaybe = (maybeUnminimizeAfter .) . raiseNextMaybeCustomFocus bringWindow
bindBringAndRaise :: KeyMask -> KeySym -> X () -> Query Bool -> [((KeyMask, KeySym), X ())] bindBringAndRaise :: KeyMask -> KeySym -> X () -> Query Bool -> [((KeyMask, KeySym), X ())]
@ -268,8 +270,10 @@ bindBringAndRaiseMany = concatMap (\(a, b, c, d) -> bindBringAndRaise a b c d)
addKeys conf@XConfig {modMask = modm} = addKeys conf@XConfig {modMask = modm} =
[ ((modm, xK_p), spawn "rofi -show drun") [ ((modm, xK_p), spawn "rofi -show drun")
, ((modm .|. shiftMask, xK_p), spawn "rofi -show run") , ((modm .|. shiftMask, xK_p), spawn "rofi -show run")
, ((modm, xK_g), actionMenu myWindowBringerConfig greedyFocusWindow) , ((modm, xK_g), maybeUnminimizeAfter $
, ((modm, xK_b), bringMenuConfig myWindowBringerConfig) actionMenu myWindowBringerConfig greedyFocusWindow)
, ((modm, xK_b), maybeUnminimizeAfter $
bringMenuConfig myWindowBringerConfig)
, ((modm .|. controlMask, xK_t), spawn , ((modm .|. controlMask, xK_t), spawn
"systemctl --user restart taffybar.service") "systemctl --user restart taffybar.service")
, ((modm, xK_v), spawn "copyq paste") , ((modm, xK_v), spawn "copyq paste")