[XMonad] Fix indentation and whitespace in several spots

This commit is contained in:
Ivan Malison 2016-11-29 15:47:24 -08:00
parent f640202a26
commit 18cfb40606
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -124,7 +124,8 @@ emacsSelector = className =? "Emacs"
transmissionSelector = fmap (isPrefixOf "Transmission") title transmissionSelector = fmap (isPrefixOf "Transmission") title
hangoutsSelector = chromeSelectorBase <&&> fmap isHangoutsTitle title hangoutsSelector = chromeSelectorBase <&&> fmap isHangoutsTitle title
virtualClasses = [ (hangoutsSelector, "Hangouts") virtualClasses =
[ (hangoutsSelector, "Hangouts")
, (chromeSelector, "Chrome") , (chromeSelector, "Chrome")
, (transmissionSelector, "Transmission") , (transmissionSelector, "Transmission")
] ]
@ -158,7 +159,8 @@ unmodifyLayout (ModifiedLayout _ x') = x'
selectLimit = selectLimit =
DM.menuArgs "rofi" ["-dmenu", "-i"] ["2", "3", "4"] >>= (setLimit . read) DM.menuArgs "rofi" ["-dmenu", "-i"] ["2", "3", "4"] >>= (setLimit . read)
data MyToggles = LIMIT data MyToggles
= LIMIT
| GAPS | GAPS
| MAGICFOCUS | MAGICFOCUS
deriving (Read, Show, Eq, Typeable) deriving (Read, Show, Eq, Typeable)
@ -190,7 +192,8 @@ toggleStateToString s =
toggleToStringWithState :: (Transformer t Window, Show t) => t -> X String toggleToStringWithState :: (Transformer t Window, Show t) => t -> X String
toggleToStringWithState toggle = toggleToStringWithState toggle =
(printf "%s (%s)" (show toggle) . toggleStateToString) <$> isToggleActive toggle (printf "%s (%s)" (show toggle) . toggleStateToString) <$>
isToggleActive toggle
selectToggle = selectToggle =
togglesMap >>= DM.menuMapArgs "rofi" ["-dmenu", "-i"] >>= togglesMap >>= DM.menuMapArgs "rofi" ["-dmenu", "-i"] >>=
@ -277,7 +280,8 @@ myDecorateName ws w = do
-- done with the existing window bringer interface -- done with the existing window bringer interface
myBringWindow WindowBringerConfig { menuCommand = cmd myBringWindow WindowBringerConfig { menuCommand = cmd
, menuArgs = args , menuArgs = args
, windowTitler = titler } = , windowTitler = titler
} =
windowMap' titler >>= DM.menuMapArgs cmd args >>= flip whenJust action windowMap' titler >>= DM.menuMapArgs cmd args >>= flip whenJust action
where where
action window = action window =
@ -371,10 +375,10 @@ actOnWindowsInWorkspace windowAction getWindowsAction = restoreFocus $
windowsWithUnfocusedClass ws = windowsWithOtherClasses (W.focus ws) ws windowsWithUnfocusedClass ws = windowsWithOtherClasses (W.focus ws) ws
windowsWithFocusedClass ws = windowsWithSameClass (W.focus ws) ws windowsWithFocusedClass ws = windowsWithSameClass (W.focus ws) ws
windowsWithOtherClasses = windowsMatchingPredicate (/=) windowsWithOtherClasses = windowsMatchingClassPredicate (/=)
windowsWithSameClass = windowsMatchingPredicate (==) windowsWithSameClass = windowsMatchingClassPredicate (==)
windowsMatchingPredicate predicate window workspace = windowsMatchingClassPredicate predicate window workspace =
windowsSatisfyingPredicate workspace $ do windowsSatisfyingPredicate workspace $ do
windowClass <- getClass window windowClass <- getClass window
return $ predicate windowClass return $ predicate windowClass
@ -476,17 +480,17 @@ swapFocusedWith w ws = W.modify' (swapFocusedWith' w) (W.delete' w ws)
swapFocusedWith' w (W.Stack current ls rs) = W.Stack w ls (rs ++ [current]) swapFocusedWith' w (W.Stack current ls rs) = W.Stack w ls (rs ++ [current])
swapMinimizeStateAfter action = swapMinimizeStateAfter action =
withFocused $ withFocused $ \originalWindow -> do
\originalWindow -> do
_ <- action _ <- action
restoreFocus $ restoreFocus $ do
do maybeUnminimizeFocused maybeUnminimizeFocused
withFocused $ withFocused $ \newWindow ->
\newWindow -> when (newWindow /= originalWindow) $ minimizeWindow originalWindow when (newWindow /= originalWindow) $ minimizeWindow originalWindow
-- Named Scratchpads -- Named Scratchpads
scratchpads = [ NS "htop" htopCommnad (title =? "htop") nonFloating scratchpads =
[ NS "htop" htopCommnad (title =? "htop") nonFloating
, NS "spotify" spotifyCommand spotifySelector nonFloating , NS "spotify" spotifyCommand spotifySelector nonFloating
, NS "hangouts" hangoutsCommand hangoutsSelector nonFloating , NS "hangouts" hangoutsCommand hangoutsSelector nonFloating
] ]