From adddfb456b47d22585b1edae6ea80cfa25105b43 Mon Sep 17 00:00:00 2001 From: Tomas Janousek Date: Thu, 5 Nov 2020 00:35:34 +0000 Subject: [PATCH] (wip) Related: https://github.com/xmonad/xmonad-contrib/issues/396 Related: https://github.com/xmonad/xmonad-contrib/pull/109 --- CHANGES.md | 27 ++++++++++++++------------- XMonad/Hooks/EwmhDesktops.hs | 8 +++++++- XMonad/Hooks/Focus.hs | 2 ++ XMonad/Hooks/InsertPosition.hs | 2 ++ 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9297701b5d..52ac0cf80f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,24 +15,25 @@ * `XMonad.Hooks.EwmhDesktops` - It is no longer recommended to use `fullscreenEventHook` directly. - Instead, use `ewmhFullscreen` which additionally advertises fullscreen - support in `_NET_SUPPORTED` and fixes fullscreening of applications that - explicitly check it, e.g. mupdf-gl, sxiv, … + - It is no longer recommended to use `fullscreenEventHook` directly. + Instead, use `ewmhFullscreen` which additionally advertises fullscreen + support in `_NET_SUPPORTED` and fixes fullscreening of applications that + explicitly check it, e.g. mupdf-gl, sxiv, … - `XMonad.Layout.Fullscreen.fullscreenSupport` now advertises it as well, - and no configuration changes are required in this case. + `XMonad.Layout.Fullscreen.fullscreenSupport` now advertises it as well, + and no configuration changes are required in this case. + TODO: integrate into `ewmh'` and enable by default - * `XMonad.Hooks.EwmhDesktops` + - `ewmh` function will use `logHook` for handling activated window. And now + by default window activation will do nothing. - `ewmh` function will use `logHook` for handling activated window. And now - by default window activation will do nothing. + You can use regular `ManageHook` combinators for changing window + activation behavior and then add resulting `ManageHook` using + `activateLogHook` to your `logHook`. Also, module `X.H.Focus` provides + additional combinators. - You can use regular `ManageHook` combinators for changing window - activation behavior and then add resulting `ManageHook` using - `activateLogHook` to your `logHook`. Also, module `X.H.Focus` provides - additional combinators. + TODO: refactor and update and make it not a breaking change * `XMonad.Prompt.Directory` diff --git a/XMonad/Hooks/EwmhDesktops.hs b/XMonad/Hooks/EwmhDesktops.hs index 30470d0daf..db7101edf1 100644 --- a/XMonad/Hooks/EwmhDesktops.hs +++ b/XMonad/Hooks/EwmhDesktops.hs @@ -66,6 +66,7 @@ import XMonad.Util.WindowProperties (getProp32) -- -- You may also be interested in 'docks' from "XMonad.Hooks.ManageDocks". -- +-- TODO: mention "XMonad.Hooks.UrgencyHook" -- TODO: mention "XMonad.Hooks.Focus" -- | TODO @@ -77,7 +78,7 @@ data EwmhConfig = EwmhConfig instance Default EwmhConfig where def = EwmhConfig { workspaceListTransform = id - , activateHook = doFocus + , activateHook = doFocus -- TODO: urgency } -- | 'ewmh'' with default 'EwmhConfig'. @@ -210,6 +211,11 @@ ewmhDesktopsEventHook = ewmhDesktopsEventHook' def ewmhDesktopsEventHookCustom :: ([WindowSpace] -> [WindowSpace]) -> Event -> X All ewmhDesktopsEventHookCustom f = ewmhDesktopsEventHook' def{ workspaceListTransform = f } +-- TODO: PureX, flicker +-- TODO: fullscreen flag +-- TODO: deprecate separate fullscreen and enable it by default, then move the +-- implementation to X.L.Fullscreen + -- | -- Intercepts messages from pagers and similar applications and reacts on them. -- Currently supports: diff --git a/XMonad/Hooks/Focus.hs b/XMonad/Hooks/Focus.hs index 0f609c9160..36f0ee19b9 100644 --- a/XMonad/Hooks/Focus.hs +++ b/XMonad/Hooks/Focus.hs @@ -345,6 +345,8 @@ data Focus = Focus , currentWorkspace :: WorkspaceId } deriving (Show) + +-- TODO: drop this instance Default Focus where def = Focus { focusedWindow = Nothing diff --git a/XMonad/Hooks/InsertPosition.hs b/XMonad/Hooks/InsertPosition.hs index ab123d3f5d..a24b527358 100644 --- a/XMonad/Hooks/InsertPosition.hs +++ b/XMonad/Hooks/InsertPosition.hs @@ -13,6 +13,8 @@ -- ----------------------------------------------------------------------------- +-- TODO: note about XMonad.Hooks.Focus + module XMonad.Hooks.InsertPosition ( -- * Usage -- $usage