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 grid properties, movement and resizing #57

Closed
wants to merge 6 commits into from
Closed

Add grid properties, movement and resizing #57

wants to merge 6 commits into from

Conversation

mtreca
Copy link
Contributor

@mtreca mtreca commented Sep 18, 2018

Following issue #56

Note that it is my first time using C for a non-trivial project, so feel free to point out any mistakes I may have made.

Changes

Properties

I added grid properties on all windows:

  • state can now be "gridded"
  • grid dimensions, window position and size

Functions

Two new waitron functions:

  • window_resize_in_grid to resize windows with grid steps
  • window_move_in_grid to move a window with grid steps

These functions do not allow a window to go beyond the edges of the screen.

Both functions seem to work find so far (as in, I didn't find any bugs yet).

@tudurom
Copy link
Owner

tudurom commented Sep 21, 2018 via email

@tudurom
Copy link
Owner

tudurom commented Sep 21, 2018

If this implementation has advantages that cannot be made into a script then I may change my mind.

@mtreca
Copy link
Contributor Author

mtreca commented Sep 21, 2018

Thanks for the feedback.

The biggest advantage of not using a script right now is to limit the number of dependencies (wmutils, xprop, and the script itself) and improve performance (12 calls to xprop for a single movement or resize call in the script).

I agree that these advantages are a bit light so far, but I plan on implementing other grid based features (dynamically changing the grid size, other suggestions are welcome) that would incrementally benefit from being implemented in windowchef's core.

Of course the obvious drawback of putting this in core would be code bloat and the fact that a few people actually use this functionality.

Either way, feel free to merge or not, I'll keep this branch waiting. I'll post here if any other drawbacks or advantages come to mind.

Also, it was actually pretty fun working on windowchef's source. I don't know if you have a roadmap or todo list for the project, but I would be interested in contributing more regularly.

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.

2 participants