[XMonad] Fixup whitespace

This commit is contained in:
Ivan Malison 2016-11-21 17:42:55 -08:00
parent 26cdc5d340
commit 78de86f197
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -107,9 +107,11 @@ instance Transformer MyToggles Window where
myToggles = [LIMIT, GAPS, MAGICFOCUS]
otherToggles = [NBFULL, MIRROR]
togglesMap = fmap M.fromList $ sequence $ map toggleTuple myToggles ++ map toggleTuple otherToggles
togglesMap = fmap M.fromList $ sequence $
map toggleTuple myToggles ++ map toggleTuple otherToggles
where
toggleTuple toggle = fmap (\str -> (str, Toggle toggle)) (toggleToStringWithState toggle)
toggleTuple toggle = fmap (\str -> (str, Toggle toggle))
(toggleToStringWithState toggle)
toggleStateToString s = case s of
Just True -> "ON"
@ -117,7 +119,8 @@ toggleStateToString s = case s of
Nothing -> "N/A"
toggleToStringWithState :: (Transformer t Window, Show t) => t -> X String
toggleToStringWithState toggle = (printf "%s (%s)" (show toggle) . toggleStateToString) <$>
toggleToStringWithState toggle =
(printf "%s (%s)" (show toggle) . toggleStateToString) <$>
isToggleActive toggle
selectToggle = togglesMap >>= DM.menuMapArgs "rofi" ["-dmenu", "-i"] >>=
@ -130,7 +133,8 @@ whenB b a = do
when b a
return b
setToggleActive' toggle active = toggleInState toggle (Just active) >>=
setToggleActive' toggle active =
toggleInState toggle (Just active) >>=
flip whenB (sendMessage $ Toggle toggle)
-- Ambiguous type reference without signature
@ -139,7 +143,8 @@ setToggleActive = (void .) . setToggleActive'
deactivateFull = setToggleActive NBFULL False
toggleOr toggle toState action = setToggleActive' toggle toState >>= ((`when` action) . not)
toggleOr toggle toState action = setToggleActive' toggle toState >>=
((`when` action) . not)
deactivateFullOr = toggleOr NBFULL False
deactivateFullAnd action = sequence_ [deactivateFull, action]
@ -209,7 +214,8 @@ myBringWindow WindowBringerConfig{ menuCommand = cmd
} =
windowMap' titler >>= DM.menuMapArgs cmd args >>= flip whenJust action
where action window = sequence_ [ maximizeWindow window
, windows $ W.focusWindow window . bringWindow window
, windows $ W.focusWindow window .
bringWindow window
]
-- Dynamic Workspace Renaming
@ -357,8 +363,10 @@ swapMinimizeStateAfter action = withFocused $ \originalWindow -> do
-- Raise or spawn
myRaiseNextMaybe = (maybeUnminimizeClassAfter .) . raiseNextMaybeCustomFocus greedyFocusWindow
myBringNextMaybe = (maybeUnminimizeAfter .) . raiseNextMaybeCustomFocus bringWindow
myRaiseNextMaybe = (maybeUnminimizeClassAfter .) .
raiseNextMaybeCustomFocus greedyFocusWindow
myBringNextMaybe = (maybeUnminimizeAfter .) .
raiseNextMaybeCustomFocus bringWindow
bindBringAndRaise :: KeyMask -> KeySym -> X () -> Query Bool -> [((KeyMask, KeySym), X ())]
bindBringAndRaise mask sym start query =