[XMonad] Fix lint issues
This commit is contained in:
parent
04f74ec9ee
commit
7cf973df02
@ -153,8 +153,8 @@ visibleWindows =
|
|||||||
|
|
||||||
followingWindow action = do
|
followingWindow action = do
|
||||||
orig <- withWindowSet (return . W.peek)
|
orig <- withWindowSet (return . W.peek)
|
||||||
action
|
_ <- action
|
||||||
whenJust orig (\win -> windows $ W.focusWindow win)
|
whenJust orig $ windows . W.focusWindow
|
||||||
|
|
||||||
-- Selectors
|
-- Selectors
|
||||||
|
|
||||||
@ -362,12 +362,14 @@ getChromeTabInfo = do
|
|||||||
return $ M.fromList $ map parseChromixLine $ lines output
|
return $ M.fromList $ map parseChromixLine $ lines output
|
||||||
where parseChromixLine line =
|
where parseChromixLine line =
|
||||||
case splitOn " " line of
|
case splitOn " " line of
|
||||||
|
[] -> undefined
|
||||||
tid:uri:rest -> let ttl = concat rest in
|
tid:uri:rest -> let ttl = concat rest in
|
||||||
(printf "%s - %s" tid ttl :: String,
|
(printf "%s - %s" tid ttl :: String,
|
||||||
ChromeInfo { tabId = read tid
|
ChromeInfo { tabId = read tid
|
||||||
, tabUri = uri
|
, tabUri = uri
|
||||||
, tabTitle = ttl
|
, tabTitle = ttl
|
||||||
})
|
})
|
||||||
|
[_] -> undefined
|
||||||
|
|
||||||
selectChromeTab WindowBringerConfig { menuCommand = cmd
|
selectChromeTab WindowBringerConfig { menuCommand = cmd
|
||||||
, menuArgs = args
|
, menuArgs = args
|
||||||
@ -721,7 +723,7 @@ getNextScreen ws =
|
|||||||
minimumBy compareScreen candidates
|
minimumBy compareScreen candidates
|
||||||
where currentId = W.screen $ W.current ws
|
where currentId = W.screen $ W.current ws
|
||||||
otherScreens = W.visible ws
|
otherScreens = W.visible ws
|
||||||
largerId = filter ((> currentId) . W.screen) $ otherScreens
|
largerId = filter ((> currentId) . W.screen) otherScreens
|
||||||
compareScreen a b = compare (W.screen a) (W.screen b)
|
compareScreen a b = compare (W.screen a) (W.screen b)
|
||||||
candidates =
|
candidates =
|
||||||
case largerId of
|
case largerId of
|
||||||
@ -729,16 +731,16 @@ getNextScreen ws =
|
|||||||
_ -> largerId
|
_ -> largerId
|
||||||
|
|
||||||
goToNextScreen ws =
|
goToNextScreen ws =
|
||||||
if screenEq nextScreen currScreen then ws
|
if screenEq nScreen currScreen then ws
|
||||||
else ws { W.current = nextScreen
|
else ws { W.current = nScreen
|
||||||
, W.visible = currScreen : trimmedVisible
|
, W.visible = currScreen : trimmedVisible
|
||||||
}
|
}
|
||||||
where
|
where
|
||||||
currScreen = W.current ws
|
currScreen = W.current ws
|
||||||
nextScreen = getNextScreen ws
|
nScreen = getNextScreen ws
|
||||||
screenEq a b = W.screen a == W.screen b
|
screenEq a b = W.screen a == W.screen b
|
||||||
trimmedVisible =
|
trimmedVisible =
|
||||||
(filter (not . screenEq nextScreen) $ W.visible ws)
|
filter (not . screenEq nScreen) $ W.visible ws
|
||||||
|
|
||||||
goToNextScreenX = windows goToNextScreen
|
goToNextScreenX = windows goToNextScreen
|
||||||
|
|
||||||
@ -899,7 +901,6 @@ addKeys conf@XConfig { modMask = modm } =
|
|||||||
modalt = modm .|. mod1Mask
|
modalt = modm .|. mod1Mask
|
||||||
hyper = mod3Mask
|
hyper = mod3Mask
|
||||||
hctrl = hyper .|. controlMask
|
hctrl = hyper .|. controlMask
|
||||||
halt = hyper .|. mod1Mask
|
|
||||||
|
|
||||||
-- Local Variables:
|
-- Local Variables:
|
||||||
-- flycheck-ghc-args: ("-Wno-missing-signatures")
|
-- flycheck-ghc-args: ("-Wno-missing-signatures")
|
||||||
|
Loading…
Reference in New Issue
Block a user