Closed Zawaken closed 11 months ago
Hm, strictly this breaks PVP so should have a major version bump. But I think we're headed that way anyway, whenever we get around to the next release. (0.17.2 didn't contain any of these changes, just what was needed for GHC 9.6 and its bundled libraries.)
Duplicate of https://github.com/xmonad/xmonad-contrib/pull/583
Further, the custommaximizeVertical
can already be done with the magnify
combinator, as far as I can tell. Is there really anything that actually requires us to expose these internals?
magnify
's documentation (and implementation; I checked) specifically expands the selected window in both dimensions, unlike maximizeVertically
.
Ah, right, we use the same number twice… Well, looks like we just need a more general combinator then?
I didn't realize this was a duplicate, but I see now that it is.
I have tested doing some changes in a branch in my fork that might be better, where I have changed magnify
to allow for custom horizontal and vertical values. (the magnifiercxy name is kind of a placeholder, and to show how this would work)
Is this more in line with what you were thinking @slotThe, if so I can create a Pull request for the new branch, or merge it into this pull request.
I have tested doing some changes in a branch in my fork that might be better, where I have changed
magnify
to allow for custom horizontal and vertical values. (the magnifiercxy name is kind of a placeholder, and to show how this would work)Is this more in line with what you were thinking @slotThe, if so I can create a Pull request for the new branch, or merge it into this pull request.
Mh, I was more thinking of creating another (yet another, I know…) general combinator; I'm not sure a breaking change is warranted here
So in essence another 'magnify' then? I updated the changes to what I think you mean now. I do feel this is a bit dirty though, but it works just as well as the previous one.
What's "a bit dirty" about it? If anything, I'd say the one that requires users to use ModifiedLayout
directly is the dirty one; it's intended to be internal.
I mean compared to my previous proposed solution, changing magnify
to accept two Rationals worked like a charm, and didn't seem to break anything, so the new one in the magnifiercxy
branch feels a bit dirtier, or not needed if that makes sense.
But both of them work well.
It is like you say, way less dirty than using ModifiedLayout
.
Right, but changing magnify
is non-backward-compatible. That's why @slotThe wants a new combinator instead.
Aha, that makes more sense then, thanks.
I will see if I can figure out some better names for the combinators and create a PR for these changes.
Closed by #822
Description
Include a description for your changes, including the motivation behind them.
I've made XMonad.Layout.Magnifier export All constructors under 'Magnifier' and 'Toggle', so that it is possible to make custom magnifiers, with control over size both horizontally and vertically.
Example:
Checklist
[x] I've read CONTRIBUTING.md
[x] I've considered how to best test these changes (property, unit, manually, ...) and concluded: This works exactly how I want it to work
[x] I updated the
CHANGES.md
file