xmonad / xmonad-contrib

Contributed modules for xmonad
https://xmonad.org
BSD 3-Clause "New" or "Revised" License
579 stars 272 forks source link

Add magnifiyxy combinator to XMonad.Layout.Magnifier #822

Closed Zawaken closed 11 months ago

Zawaken commented 11 months ago

Description

Include a description for your changes, including the motivation behind them.

I've added another general combinator to XMonad.Layout.Magnifier, that allows setting up custom size both horizontally and vertically. magnifyxy is the new combinator, and the new implementations of magnifiers are magnifierxy, magnifierxy', magnifierxyOff, and magnifierxyOff'.

Not sure if I am 100% on the names of the combinators.

This was mostly done to make it possible to make a maximizeVertical that defaults to On.

magnifierxy 1 1000 (Tall 1 (3/100) (1/2))

Checklist

geekosaur commented 11 months ago

FWIW when making a modified version of an existing combinator, the Haskell convention is to append a prime ' to the name. There are several examples already in the module.

Zawaken commented 11 months ago

Yeah, I saw magnify' was already used, so not sure what to then call it.

If you have any idea that is better than what I have put here, I would gladly take them. 😄

slotThe commented 11 months ago

(If you want, I can also make these changes, and squash everything together nicely; just say so)

Zawaken commented 11 months ago

Yeah I'd love that @slotThe 😄

slotThe commented 11 months ago

Thank you for the contribution! :tada: