mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops
Together with ewmhDesktopsLogHookCustom this exposes workspace names to external pagers. Fixes: https://github.com/xmonad/xmonad-contrib/pull/105 Fixes: https://github.com/xmonad/xmonad-contrib/pull/122 Co-authored-by: Ivan Malison <IvanMalison@gmail.com>
This commit is contained in:
parent
3dc6b44f86
commit
f271d59c34
@ -251,6 +251,11 @@
|
|||||||
|
|
||||||
- Export `Minimize` type constructor.
|
- Export `Minimize` type constructor.
|
||||||
|
|
||||||
|
* `XMonad.Actions.WorkspaceNames`
|
||||||
|
|
||||||
|
- Added `workspaceNamesListTransform` which makes workspace names visible
|
||||||
|
to external pagers.
|
||||||
|
|
||||||
* Several `LayoutClass` instances now have an additional `Typeable`
|
* Several `LayoutClass` instances now have an additional `Typeable`
|
||||||
constraint which may break some advanced configs. The upside is that we
|
constraint which may break some advanced configs. The upside is that we
|
||||||
can now add `Typeable` to `LayoutClass` in `XMonad.Core` and make it
|
can now add `Typeable` to `LayoutClass` in `XMonad.Core` and make it
|
||||||
|
@ -37,7 +37,10 @@ module XMonad.Actions.WorkspaceNames (
|
|||||||
swapWithCurrent,
|
swapWithCurrent,
|
||||||
|
|
||||||
-- * Workspace prompt
|
-- * Workspace prompt
|
||||||
workspaceNamePrompt
|
workspaceNamePrompt,
|
||||||
|
|
||||||
|
-- * EwmhDesktops integration
|
||||||
|
workspaceNamesListTransform
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import XMonad
|
import XMonad
|
||||||
@ -184,3 +187,14 @@ workspaceNamePrompt conf job = do
|
|||||||
Just i -> i
|
Just i -> i
|
||||||
contains completions input =
|
contains completions input =
|
||||||
return $ filter (Data.List.isInfixOf input) completions
|
return $ filter (Data.List.isInfixOf input) completions
|
||||||
|
|
||||||
|
-- | Workspace list transformation for
|
||||||
|
-- 'XMonad.Hooks.EwmhDesktops.ewmhDesktopsLogHookCustom' that exposes
|
||||||
|
-- workspace names to pagers and other EWMH-aware clients.
|
||||||
|
--
|
||||||
|
-- Usage:
|
||||||
|
-- > logHook = (workspaceNamesListTransform >>= ewmhDesktopsLogHookCustom) <+> …
|
||||||
|
workspaceNamesListTransform :: X ([WindowSpace] -> [WindowSpace])
|
||||||
|
workspaceNamesListTransform = do
|
||||||
|
names <- getWorkspaceNames
|
||||||
|
return $ map $ \ws -> ws{ W.tag = names $ W.tag ws }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user