mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-18 19:10:21 -07:00
X.H.IndependentScreens: Added screenOnMonitor to the export list.
This commit is contained in:
parent
195a0ac3c0
commit
b1bf33d6eb
@ -54,6 +54,7 @@
|
||||
belong to.
|
||||
- Added `doFocus'` hook as an alternative for `doFocus` when using
|
||||
IndependentScreens.
|
||||
- Added `screenOnMonitor` for getting the active screen for a monitor.
|
||||
|
||||
* `XMonad.Util.NamedScratchPad`
|
||||
|
||||
|
@ -335,11 +335,10 @@ disableEwmhManageDesktopViewport = XC.modifyDef $ \c -> c{ manageDesktopViewport
|
||||
-- > import XMonad.Layout.IndependentScreens
|
||||
-- >
|
||||
-- > customMapper :: WindowSet -> (WindowSpace -> WindowScreen)
|
||||
-- > customMapper winset (Workspace wsid _ _) = fromMaybe (W.current winset) screenOnMonitor
|
||||
-- > customMapper winset (Workspace wsid _ _) = fromMaybe (W.current winset) maybeMappedScreen
|
||||
-- > where
|
||||
-- > screenId = unmarshallS wsid
|
||||
-- > screenOnMonitor :: Maybe WindowScreen
|
||||
-- > screenOnMonitor = find ((screenId ==) . W.screen) (W.current winset : W.visible winset)
|
||||
-- > maybeMappedScreen = screenOnMonitor screenId winset
|
||||
-- >
|
||||
-- >
|
||||
-- > main = xmonad $ ... . setEwmhHiddenWorkspaceToScreenMapping customMapper . ewmh . ... $ def{...}
|
||||
|
@ -26,7 +26,7 @@ module XMonad.Layout.IndependentScreens (
|
||||
marshallPP,
|
||||
whenCurrentOn,
|
||||
countScreens,
|
||||
workspacesOn,
|
||||
workspacesOn, screenOnMonitor,
|
||||
workspaceOnScreen, focusWindow', doFocus', focusScreen, focusWorkspace, nthWorkspace, withWspOnScreen,
|
||||
-- * Converting between virtual and physical workspaces
|
||||
-- $converting
|
||||
@ -148,7 +148,7 @@ withWspOnScreen screenId operation ws = case workspaceOnScreen screenId ws of
|
||||
Just wsp -> operation wsp ws
|
||||
Nothing -> ws
|
||||
|
||||
-- | Get the workspace that is active on a given screen.
|
||||
-- | Get the screen that is active on a given monitor.
|
||||
screenOnMonitor :: ScreenId -> WindowSet -> Maybe WindowScreen
|
||||
screenOnMonitor screenId ws = find ((screenId ==) . W.screen) (W.current ws : W.visible ws)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user