[XMonad] Add toggle functions (needed for previous rewrites)

This commit is contained in:
Ivan Malison 2016-11-25 18:41:16 -08:00
parent 6eae7024f8
commit f00e2cc920
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -88,6 +88,14 @@ if' False _ y = y
ifL :: a -> a -> Bool -> a ifL :: a -> a -> Bool -> a
ifL a b c = if' c a b ifL a b c = if' c a b
toggleInMap' d k m =
let existingValue = M.findWithDefault d k m
in (M.insert k (not existingValue) m)
toggleInMap = toggleInMap' True
maybeRemap k = M.findWithDefault k k
-- Selectors -- Selectors