Skip to content
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

Add new module: X.L.CircleEx: advanced version of Circle layout #848

Merged
merged 2 commits into from
Dec 21, 2023

Conversation

portnov
Copy link
Contributor

@portnov portnov commented Dec 11, 2023

Description

X.L.Circle layout is somewhat nice, but it does not provide much possibilities for customization. This adds a new module, X.L.CircleEx, which is similar to X.L.Circle, but has some new features:

  • Number of "master" windows can be adjusted. For example, with 0 master windows, all windows go in a circle, nothing in the center.
  • It's possible to configure sizes of master window and slave window (as a portion of screen size).
  • Size of each next slave window is slightly less than size of previous (configurable)
  • It's possible to rotate whole setup clockwise / counterclockwise. For example, by default first slave window opens near right edge of the screen, but I like it to open near left top corner.

Checklist

  • I've read CONTRIBUTING.md

  • I've done extensive manual testing by using it for a month :)

  • I updated the CHANGES.md file

@portnov portnov marked this pull request as draft December 12, 2023 21:05
@portnov portnov marked this pull request as ready for review December 13, 2023 14:21
Copy link
Member

@slotThe slotThe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on a cursory read, this look fine, thanks! 👍

Since you say that this essentially supersedes X.L.Circle, would it be possible to (i) implement that in terms of this new module, and (ii) perhaps deprecate X.L.Circle (if that's desired)?

XMonad/Layout/CircleEx.hs Outdated Show resolved Hide resolved
@portnov
Copy link
Contributor Author

portnov commented Dec 17, 2023

(i) implement that in terms of this new module, and (ii) perhaps deprecate X.L.Circle (if that's desired)?

Ok. For (i), I added a variant of default settings which mimics X.L.Circle's hardcoded settings.

Copy link
Member

@TheMC47 TheMC47 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, just came by to say that a screenshot would be great 😄

@portnov
Copy link
Contributor Author

portnov commented Dec 18, 2023

@TheMC47
Screenshot_20231218_152452

@portnov
Copy link
Contributor Author

portnov commented Dec 21, 2023

@slotThe
ok, importing (:%) from GHC.Real did the trick. I'm not very happy with exporting data constructor, because it will complicate things if / when it will be required to add fields to data type. But probably you're right and not having a duplicate of logic overweights that potential problem.

Now, when I deprecated X.L.Circle module, I see some number of deprecation warnings, since it was used in several places. I think I should also replace Circle with CircleEx in these places.

@slotThe
Copy link
Member

slotThe commented Dec 21, 2023

Now, when I deprecated X.L.Circle module, I see some number of deprecation warnings, since it was used in several places. I think I should also replace Circle with CircleEx in these places.

Sounds good 👍

@portnov
Copy link
Contributor Author

portnov commented Dec 21, 2023

Done. Please review.

@slotThe slotThe merged commit c01cd3a into xmonad:master Dec 21, 2023
18 checks passed
@slotThe
Copy link
Member

slotThe commented Dec 21, 2023

Thanks! (I just pushed some doc fixes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants