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.
|
belong to.
|
||||||
- Added `doFocus'` hook as an alternative for `doFocus` when using
|
- Added `doFocus'` hook as an alternative for `doFocus` when using
|
||||||
IndependentScreens.
|
IndependentScreens.
|
||||||
|
- Added `screenOnMonitor` for getting the active screen for a monitor.
|
||||||
|
|
||||||
* `XMonad.Util.NamedScratchPad`
|
* `XMonad.Util.NamedScratchPad`
|
||||||
|
|
||||||
|
@ -335,11 +335,10 @@ disableEwmhManageDesktopViewport = XC.modifyDef $ \c -> c{ manageDesktopViewport
|
|||||||
-- > import XMonad.Layout.IndependentScreens
|
-- > import XMonad.Layout.IndependentScreens
|
||||||
-- >
|
-- >
|
||||||
-- > customMapper :: WindowSet -> (WindowSpace -> WindowScreen)
|
-- > customMapper :: WindowSet -> (WindowSpace -> WindowScreen)
|
||||||
-- > customMapper winset (Workspace wsid _ _) = fromMaybe (W.current winset) screenOnMonitor
|
-- > customMapper winset (Workspace wsid _ _) = fromMaybe (W.current winset) maybeMappedScreen
|
||||||
-- > where
|
-- > where
|
||||||
-- > screenId = unmarshallS wsid
|
-- > screenId = unmarshallS wsid
|
||||||
-- > screenOnMonitor :: Maybe WindowScreen
|
-- > maybeMappedScreen = screenOnMonitor screenId winset
|
||||||
-- > screenOnMonitor = find ((screenId ==) . W.screen) (W.current winset : W.visible winset)
|
|
||||||
-- >
|
-- >
|
||||||
-- >
|
-- >
|
||||||
-- > main = xmonad $ ... . setEwmhHiddenWorkspaceToScreenMapping customMapper . ewmh . ... $ def{...}
|
-- > main = xmonad $ ... . setEwmhHiddenWorkspaceToScreenMapping customMapper . ewmh . ... $ def{...}
|
||||||
|
@ -26,7 +26,7 @@ module XMonad.Layout.IndependentScreens (
|
|||||||
marshallPP,
|
marshallPP,
|
||||||
whenCurrentOn,
|
whenCurrentOn,
|
||||||
countScreens,
|
countScreens,
|
||||||
workspacesOn,
|
workspacesOn, screenOnMonitor,
|
||||||
workspaceOnScreen, focusWindow', doFocus', focusScreen, focusWorkspace, nthWorkspace, withWspOnScreen,
|
workspaceOnScreen, focusWindow', doFocus', focusScreen, focusWorkspace, nthWorkspace, withWspOnScreen,
|
||||||
-- * Converting between virtual and physical workspaces
|
-- * Converting between virtual and physical workspaces
|
||||||
-- $converting
|
-- $converting
|
||||||
@ -148,7 +148,7 @@ withWspOnScreen screenId operation ws = case workspaceOnScreen screenId ws of
|
|||||||
Just wsp -> operation wsp ws
|
Just wsp -> operation wsp ws
|
||||||
Nothing -> 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 -> WindowSet -> Maybe WindowScreen
|
||||||
screenOnMonitor screenId ws = find ((screenId ==) . W.screen) (W.current ws : W.visible ws)
|
screenOnMonitor screenId ws = find ((screenId ==) . W.screen) (W.current ws : W.visible ws)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user