[XMonad] Automatically deactivate full for several commands

This commit is contained in:
Ivan Malison 2016-11-21 17:25:56 -08:00
parent 8b2bad8fa2
commit 46d893b6be
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -137,9 +137,12 @@ setToggleActive' toggle active = toggleInState toggle (Just active) >>=
setToggleActive :: (Transformer t Window) => t -> Bool -> X ()
setToggleActive = (void .) . setToggleActive'
deactivateFull = setToggleActive NBFULL False
toggleOr toggle toState action = setToggleActive' toggle toState >>= ((`when` action) . not)
deactivateFullOr = toggleOr NBFULL False
deactivateFullAnd action = sequence_ [deactivateFull, action]
-- Layout setup
@ -404,8 +407,8 @@ addKeys conf@XConfig {modMask = modm} =
-- ModAlt bindings
, ((modalt, xK_w), spawn "rofi_wallpaper.sh")
, ((modalt, xK_space), restoreOrMinimizeOtherClasses)
, ((modalt, xK_Return), restoreAllMinimized)
, ((modalt, xK_space), deactivateFullOr restoreOrMinimizeOtherClasses)
, ((modalt, xK_Return), deactivateFullAnd restoreAllMinimized)
, ((modalt, xK_5), selectToggle)
, ((modalt, xK_4), selectLimit)