forked from colonelpanic/dotfiles
[XMonad] Shorten long lines in xmonad.hs
This commit is contained in:
parent
df4ae006d5
commit
1e99dba6b5
@ -294,8 +294,15 @@ selectLayout =
|
|||||||
(sendMessage . JumpToLayout)
|
(sendMessage . JumpToLayout)
|
||||||
|
|
||||||
myLayoutHook =
|
myLayoutHook =
|
||||||
avoidStruts . minimize . boringAuto . mkToggle1 MIRROR . mkToggle1 LIMIT .
|
avoidStruts .
|
||||||
mkToggle1 GAPS . mkToggle1 MAGICFOCUS . mkToggle1 NBFULL . workspaceNamesHook .
|
minimize .
|
||||||
|
boringAuto .
|
||||||
|
mkToggle1 MIRROR .
|
||||||
|
mkToggle1 LIMIT .
|
||||||
|
mkToggle1 GAPS .
|
||||||
|
mkToggle1 MAGICFOCUS .
|
||||||
|
mkToggle1 NBFULL .
|
||||||
|
workspaceNamesHook .
|
||||||
lessBorders Screen $ fst layoutInfo
|
lessBorders Screen $ fst layoutInfo
|
||||||
|
|
||||||
-- WindowBringer
|
-- WindowBringer
|
||||||
@ -383,8 +390,9 @@ myGoToWindow =
|
|||||||
myBringWindow = myWindowAction $ chromeTabAction True doBringWindow
|
myBringWindow = myWindowAction $ chromeTabAction True doBringWindow
|
||||||
|
|
||||||
myReplaceWindow =
|
myReplaceWindow =
|
||||||
swapMinimizeStateAfter $ myWindowAct myWindowBringerConfig $
|
swapMinimizeStateAfter $
|
||||||
chromeTabAction True (windows . swapFocusedWith)
|
myWindowAct myWindowBringerConfig $
|
||||||
|
chromeTabAction True (windows . swapFocusedWith)
|
||||||
|
|
||||||
-- Dynamic Workspace Renaming
|
-- Dynamic Workspace Renaming
|
||||||
|
|
||||||
@ -422,7 +430,8 @@ newtype ToggleFade a =
|
|||||||
ToggleFade { fadesMap :: M.Map a Bool }
|
ToggleFade { fadesMap :: M.Map a Bool }
|
||||||
deriving (Typeable, Read, Show)
|
deriving (Typeable, Read, Show)
|
||||||
|
|
||||||
instance (Typeable a, Read a, Show a, Ord a) => ExtensionClass (ToggleFade a) where
|
instance (Typeable a, Read a, Show a, Ord a) =>
|
||||||
|
ExtensionClass (ToggleFade a) where
|
||||||
initialValue = ToggleFade M.empty
|
initialValue = ToggleFade M.empty
|
||||||
extensionType = PersistentExtension
|
extensionType = PersistentExtension
|
||||||
|
|
||||||
@ -436,7 +445,8 @@ fadeEnabledForScreen = fadeEnabledFor getWindowScreen
|
|||||||
getScreens = withWindowSet $ return . W.screens
|
getScreens = withWindowSet $ return . W.screens
|
||||||
getWindowWorkspace' = W.findTag <$> ask <*> liftX (withWindowSet return)
|
getWindowWorkspace' = W.findTag <$> ask <*> liftX (withWindowSet return)
|
||||||
getWindowWorkspace = flip fromMaybe <$> getWindowWorkspace' <*> pure "1"
|
getWindowWorkspace = flip fromMaybe <$> getWindowWorkspace' <*> pure "1"
|
||||||
getWorkspaceToScreen = M.fromList . mapP' (W.tag . W.workspace) W.screen <$> getScreens
|
getWorkspaceToScreen =
|
||||||
|
M.fromList . mapP' (W.tag . W.workspace) W.screen <$> getScreens
|
||||||
getWindowScreen = M.lookup <$> getWindowWorkspace <*> liftX getWorkspaceToScreen
|
getWindowScreen = M.lookup <$> getWindowWorkspace <*> liftX getWorkspaceToScreen
|
||||||
getCurrentScreen = join (withFocusedD Nothing (runQuery getWindowScreen))
|
getCurrentScreen = join (withFocusedD Nothing (runQuery getWindowScreen))
|
||||||
|
|
||||||
@ -567,7 +577,8 @@ classWindow c = do
|
|||||||
|
|
||||||
nextClassWindow = nextClass >>= classWindow
|
nextClassWindow = nextClass >>= classWindow
|
||||||
|
|
||||||
focusNextClass' = join $ windows . maybe id greedyFocusWindow <$> nextClassWindow
|
focusNextClass' =
|
||||||
|
join $ windows . maybe id greedyFocusWindow <$> nextClassWindow
|
||||||
focusNextClass = sameClassOnly focusNextClass'
|
focusNextClass = sameClassOnly focusNextClass'
|
||||||
|
|
||||||
selectClass = join $ DM.menuArgs "rofi" ["-dmenu", "-i"] <$> allClasses
|
selectClass = join $ DM.menuArgs "rofi" ["-dmenu", "-i"] <$> allClasses
|
||||||
@ -651,7 +662,11 @@ myBringNextMaybe =
|
|||||||
((deactivateFullAnd . maybeUnminimizeAfter) .) .
|
((deactivateFullAnd . maybeUnminimizeAfter) .) .
|
||||||
raiseNextMaybeCustomFocus greedyBringWindow
|
raiseNextMaybeCustomFocus greedyBringWindow
|
||||||
|
|
||||||
bindBringAndRaise :: KeyMask -> KeySym -> X () -> Query Bool -> [((KeyMask, KeySym), X ())]
|
bindBringAndRaise :: KeyMask
|
||||||
|
-> KeySym
|
||||||
|
-> X ()
|
||||||
|
-> Query Bool
|
||||||
|
-> [((KeyMask, KeySym), X ())]
|
||||||
bindBringAndRaise mask sym start query =
|
bindBringAndRaise mask sym start query =
|
||||||
[ ((mask, sym), doRaiseNext)
|
[ ((mask, sym), doRaiseNext)
|
||||||
, ((mask .|. controlMask, sym), myBringNextMaybe start query)
|
, ((mask .|. controlMask, sym), myBringNextMaybe start query)
|
||||||
@ -659,7 +674,8 @@ bindBringAndRaise mask sym start query =
|
|||||||
]
|
]
|
||||||
where doRaiseNext = myRaiseNextMaybe start query
|
where doRaiseNext = myRaiseNextMaybe start query
|
||||||
|
|
||||||
bindBringAndRaiseMany :: [(KeyMask, KeySym, X (), Query Bool)] -> [((KeyMask, KeySym), X())]
|
bindBringAndRaiseMany :: [(KeyMask, KeySym, X (), Query Bool)]
|
||||||
|
-> [((KeyMask, KeySym), X ())]
|
||||||
bindBringAndRaiseMany = concatMap (\(a, b, c, d) -> bindBringAndRaise a b c d)
|
bindBringAndRaiseMany = concatMap (\(a, b, c, d) -> bindBringAndRaise a b c d)
|
||||||
|
|
||||||
-- Screen shift
|
-- Screen shift
|
||||||
|
Loading…
Reference in New Issue
Block a user