mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-01 12:41:52 -07:00
XMonad.Prelude: add the WindowScreen
type
`WindowScreen` is a type synonym for the specialized `Screen` type, that results from the `WindowSet` definition in XMonad.Core. Having this type defined and exported in a central module saves extension developers from trying to reconstruct it, whenever the general `Screen i l a sid sd` is not suitable. Note: this should be moved to `XMonad.Core` in the next core release.
This commit is contained in:
@@ -271,7 +271,7 @@ handleSelectWindow c = do
|
||||
$ M.elems
|
||||
$ M.mapWithKey (\sid ks -> buildOverlays ks <$> sortedOverlayWindows sid) m
|
||||
where
|
||||
screenById :: ScreenId -> Maybe (W.Screen WorkspaceId (Layout Window) Window ScreenId ScreenDetail)
|
||||
screenById :: ScreenId -> Maybe WindowScreen
|
||||
screenById sid = find ((== sid) . W.screen) (W.screens ws)
|
||||
visibleWindowsOnScreen :: ScreenId -> [Window]
|
||||
visibleWindowsOnScreen sid = filter (`elem` toList mappedWins) $ W.integrate' $ screenById sid >>= W.stack . W.workspace
|
||||
|
@@ -388,7 +388,7 @@ data Navigation2DConfig = Navigation2DConfig
|
||||
}
|
||||
|
||||
-- | Shorthand for the tedious screen type
|
||||
type Screen = W.Screen WorkspaceId (Layout Window) Window ScreenId ScreenDetail
|
||||
type Screen = WindowScreen
|
||||
|
||||
-- | Convenience function for enabling Navigation2D with typical keybindings.
|
||||
-- Takes a Navigation2DConfig, an (up, left, down, right) tuple, a mapping from
|
||||
|
Reference in New Issue
Block a user