-
-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(wip) Refactor EWMH window activation #399
Conversation
f861b5b
to
e28e141
Compare
e28e141
to
d4235fb
Compare
(test failures expected, we need to merge xmonad/X11#71 and release X11) |
d4235fb
to
8f6c8d6
Compare
a0555f8
to
dfd44cd
Compare
I played around with this a bit, and it's definitely an improvement to the UX in my opinion. Awesome work 🎉 I'm not familiar with
|
It's often difficult to make contrib modules work together. When one depends on a functionality of another, it is often necessary to expose lots of low-level functions and hooks and have the user combine these into a complex configuration that works. This is error-prone, and arguably a bad UX in general. This commit presents a simple solution to that problem inspired by "extensible state": extensible config. It allows contrib modules to store custom configuration values inside XConfig. This lets them create custom hooks, ensure they hook into xmonad core only once, and possibly other use cases I haven't thought of yet. This requires changes to xmonad core: xmonad/xmonad#294 A couple examples of what this gives us: * [X.H.RescreenHook](xmonad#460) can be made safe to apply multiple times, making it composable and usable in other contrib modules like X.H.StatusBar * `withSB` from X.H.StatusBar can also be made safe to apply multiple times, and we can even provide an API [similar to what we had before](https://hackage.haskell.org/package/xmonad-contrib-0.16/docs/XMonad-Hooks-DynamicLog.html#v:statusBar) if we want (probably not, consistency with the new dynamic status bars of xmonad#463 is more important) * The [X.H.EwmhDesktops refactor](xmonad#399) can possibly be made without breaking the `ewmh`/`ewmhFullscreen` API. And we will finally be able to have composable EWMH hooks. Related: xmonad/xmonad#294
Don't assume ewmh/docks are the only xmonad config combinator out there. Related: xmonad#396 Related: xmonad#399
Related: xmonad#396 Related: xmonad#399
Related: xmonad#396 Related: xmonad#399 Related: xmonad#192
Current version of Steam sends _NET_ACTIVE_WINDOW ClientMessage for every mouse click which results in a lot of border blinking. Ignore requests that would result in no change to get rid of the annoying border flicker that is inevitable with the current implementation of XMonad.Operations.windows. (Note that Steam also sends ConfigureRequest events, and these cause an additional refresh due to the call to `float` when handling the event in xmonad core. Not sure if worth fixing.) Related: #371 Related: #399
I cherry-picked the non-controversial bits into master over the last few days. I intend to reimplement the rest on top of the extensible config stuff (#547) later. |
In fact, i don't really understand what review you want from me. I have nothing to say about code, because i already forget (again) how all this work. Or you just want, that i try my config on current master? |
@sgf-dma Once this is in a usable state (right now it's a bit behind current developments), I'd welcome if you tried using it in your config. I remember you had some concerns about this being unwieldy for certain use cases. If you don't remember or don't care, though, I'm fine with that, and I'll just try my best not to break legitimate use cases. tl;dr: I'll let you know once it's ready. |
@liskin Ok, thanks. Well, use cases, which i thought essential (when wrote X.H.Focus), are provided in examples in comments. So, it'd be good, if all examples will work. |
It's often difficult to make contrib modules work together. When one depends on a functionality of another, it is often necessary to expose lots of low-level functions and hooks and have the user combine these into a complex configuration that works. This is error-prone, and arguably a bad UX in general. This commit presents a simple solution to that problem inspired by "extensible state": extensible config. It allows contrib modules to store custom configuration values inside XConfig. This lets them create custom hooks, ensure they hook into xmonad core only once, and possibly other use cases I haven't thought of yet. This requires changes to xmonad core: xmonad/xmonad#294 A couple examples of what this gives us: * [X.H.RescreenHook](xmonad#460) can be made safe to apply multiple times, making it composable and usable in other contrib modules like X.H.StatusBar * `withSB` from X.H.StatusBar can also be made safe to apply multiple times, and we can even provide an API [similar to what we had before](https://hackage.haskell.org/package/xmonad-contrib-0.16/docs/XMonad-Hooks-DynamicLog.html#v:statusBar) if we want (probably not, consistency with the new dynamic status bars of xmonad#463 is more important) * The [X.H.EwmhDesktops refactor](xmonad#399) can possibly be made without breaking the `ewmh`/`ewmhFullscreen` API. And we will finally be able to have composable EWMH hooks. Related: xmonad/xmonad#294
Current version of Steam sends _NET_ACTIVE_WINDOW ClientMessage for every mouse click which results in a lot of border blinking. Ignore requests that would result in no change to get rid of the annoying border flicker that is inevitable with the current implementation of XMonad.Operations.windows. (Note that Steam also sends ConfigureRequest events, and these cause an additional refresh due to the call to `float` when handling the event in xmonad core. Not sure if worth fixing.) Related: xmonad#371 Related: xmonad#399
We have a bunch of open PRs that need features added in X11-1.10. Related: xmonad#274 Related: xmonad#273 Related: xmonad/xmonad-contrib#545 Related: xmonad/xmonad-contrib#546 Related: xmonad/xmonad-contrib#399
We have a bunch of open PRs that need features added in X11-1.10. Related: #274 Related: #273 Related: xmonad/xmonad-contrib#545 Related: xmonad/xmonad-contrib#546 Related: xmonad/xmonad-contrib#399
It's often difficult to make contrib modules work together. When one depends on a functionality of another, it is often necessary to expose lots of low-level functions and hooks and have the user combine these into a complex configuration that works. This is error-prone, and arguably a bad UX in general. This commit presents a simple solution to that problem inspired by "extensible state": extensible config. It allows contrib modules to store custom configuration values inside XConfig. This lets them create custom hooks, ensure they hook into xmonad core only once, and possibly other use cases I haven't thought of yet. This requires changes to xmonad core: xmonad/xmonad#294 A couple examples of what this gives us: * [X.H.RescreenHook](xmonad#460) can be made safe to apply multiple times, making it composable and usable in other contrib modules like X.H.StatusBar * `withSB` from X.H.StatusBar can also be made safe to apply multiple times, and we can even provide an API [similar to what we had before](https://hackage.haskell.org/package/xmonad-contrib-0.16/docs/XMonad-Hooks-DynamicLog.html#v:statusBar) if we want (probably not, consistency with the new dynamic status bars of xmonad#463 is more important) * The [X.H.EwmhDesktops refactor](xmonad#399) can possibly be made without breaking the `ewmh`/`ewmhFullscreen` API. And we will finally be able to have composable EWMH hooks. Related: xmonad/xmonad#294
…tom with it We need to make EwmhDesktops configurable: not just workspaceListTransform, but users also need a way to customize the handling of _NET_ACTIVE_WINDOW, enable/disable fullscreen handling, etc. Instead of having them manually piece together chains of hooks in their XConfigs, let's introduce a EwmhConfig record and a `ewmh'` function that takes care of everything. Related: xmonad#396 Related: xmonad#109
TODO: documentation in X.H.EwmhDesktops TODO: changelog TODO: adapt X.H.Focus Related: xmonad#396 Related: xmonad#110
This makes it easier to use transforms that need some state, e.g. XMonad.Actions.WorkspaceNames could provide this. Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
These are useful when one blocks some _NET_ACTIVE_WINDOW requests but still wants to somehow show that a window requested focus. TODO: changelog
…ctrl -s) Turns out that renaming workspaces in the transform is a bad idea in the `ewmhDesktopsEventHook'` as W.view is then unable to find the workspace. This was somewhat usable before we introduced the unified `ewmh'` config combinator as one would only rename in the transform passed to `ewmhDesktopsLogHookCustom`, but with the unified config, we actually need to separate renames from sorting/reordering, otherwise switching workspaces by pagers or wmctrl doesn't work. Related: xmonad#105 Related: xmonad#122 Related: f271d59 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
8f331d4
to
b176837
Compare
(just a rebase so that I can update my daily driver, nothing exciting yet) |
We have a bunch of open PRs that need features added in X11-1.10. Related: xmonad#274 Related: xmonad#273 Related: xmonad/xmonad-contrib#545 Related: xmonad/xmonad-contrib#546 Related: xmonad/xmonad-contrib#399
#626 implements everything that was here, better, with more (but not all yet!) documentation, so this can finally be closed. |
Description
Work in progress on #396.
Checklist
I've read CONTRIBUTING.md
I tested my changes with xmonad-testing
I updated the
CHANGES.md
fileI updated the
XMonad.Doc.Extending
file (if appropriate)