mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-26 09:41:52 -07:00
Add some docs references for workspace filtering
This commit is contained in:
@@ -90,11 +90,13 @@ import qualified XMonad.StackSet as W
|
||||
-- For detailed instruction on editing the key binding see
|
||||
-- "XMonad.Doc.Extending#Editing_key_bindings"
|
||||
--
|
||||
-- For some applications (like displaying your workspaces in a status bar) it is
|
||||
-- convenient to filter out the @NSP@ workspace when looking at all workspaces.
|
||||
-- For this, you can use functions 'XMonad.Hooks.StatusBar.PP.filterOutWsPP' and
|
||||
-- 'XMonad.Util.WorkspaceCompare.filterOutWs'. See the documentation of these
|
||||
-- functions for examples.
|
||||
-- For some applications (like displaying your workspaces in a status bar) it
|
||||
-- is convenient to filter out the @NSP@ workspace when looking at all
|
||||
-- workspaces. For this, you can use 'XMonad.Hooks.StatusBar.PP.filterOutWsPP',
|
||||
-- or 'XMonad.Util.WorkspaceCompare.filterOutWs' together with
|
||||
-- 'XMonad.Hooks.EwmhDesktops.addEwmhWorkspaceSort' if your status bar gets
|
||||
-- the list of workspaces from EWMH. See the documentation of these functions
|
||||
-- for examples.
|
||||
--
|
||||
-- Further, there is also a @logHook@ that you can use to hide
|
||||
-- scratchpads when they lose focus; this is functionality akin to what
|
||||
|
@@ -111,7 +111,9 @@ scratchpadManageHook rect = namedScratchpadManageHook [NS "" "" scratchpadQuery
|
||||
|
||||
|
||||
-- | Transforms a workspace list containing the SP workspace into one that
|
||||
-- doesn't contain it. Intended for use with logHooks.
|
||||
-- doesn't contain it. Intended for use with 'logHook's (see
|
||||
-- 'XMonad.Hooks.StatusBar.PP.filterOutWsPP') and "XMonad.Hooks.EwmhDesktops"
|
||||
-- (see 'XMonad.Hooks.EwmhDesktops.addEwmhWorkspaceSort').
|
||||
scratchpadFilterOutWorkspace :: [WindowSpace] -> [WindowSpace]
|
||||
scratchpadFilterOutWorkspace = filterOutWs [scratchpadWorkspaceTag]
|
||||
|
||||
|
@@ -33,7 +33,9 @@ type WorkspaceCompare = WorkspaceId -> WorkspaceId -> Ordering
|
||||
type WorkspaceSort = [WindowSpace] -> [WindowSpace]
|
||||
|
||||
-- | Transforms a workspace list by filtering out the workspaces that
|
||||
-- correspond to the given 'tag's. Intended for use with logHooks.
|
||||
-- correspond to the given 'tag's. Intended for use with 'logHook's (see
|
||||
-- 'XMonad.Hooks.StatusBar.PP.filterOutWsPP') and "XMonad.Hooks.EwmhDesktops"
|
||||
-- (see 'XMonad.Hooks.EwmhDesktops.addEwmhWorkspaceSort').
|
||||
filterOutWs :: [WorkspaceId] -> WorkspaceSort
|
||||
filterOutWs ws = filter (\S.Workspace{ S.tag = tag } -> tag `notElem` ws)
|
||||
|
||||
|
Reference in New Issue
Block a user