Skip to content

Commit

Permalink
X.H.EwmhDesktops: Refined documentation for setEwmhSwitchDesktopAction.
Browse files Browse the repository at this point in the history
  • Loading branch information
m1mir committed Jan 23, 2025
1 parent e5377d0 commit 5aaf34a
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions XMonad/Hooks/EwmhDesktops.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module XMonad.Hooks.EwmhDesktops (
-- $customActivate
setEwmhActivateHook,

-- ** External workspace switching
-- ** Workspace switching
-- $customWorkspaceSwitch
setEwmhSwitchDesktopAction,

Expand Down Expand Up @@ -259,8 +259,19 @@ setEwmhActivateHook h = XC.modifyDef $ \c -> c{ activateHook = h }
--
-- For example if using the "XMonad.Layout.IndependentScreens" the default action
-- might move a workspace to a screen that it isn't supposed to be on.
-- This behaviour can be fixed using the following:
--
-- > -- TODO add code example
-- > import XMonad.Actions.OnScreen
-- > import XMonad.Layout.IndependentScreens
-- >
-- > main = xmonad $ ... . setEwmhSwitchDesktopAction switchDesktopAction . ewmh . ... $
-- > def{
-- > ...
-- > workspaces = withScreens 2 (workspaces def)
-- > ...
-- > }
-- >
-- > switchDesktopAction workspaceId = viewOnScreen (unmarshallS workspaceId) workspaceId

-- | Set (replace) the action which is invoked when a client sends a
-- @_NET_CURRENT_DESKTOP@ request to switch workspace.
Expand Down

0 comments on commit 5aaf34a

Please sign in to comment.