-
Notifications
You must be signed in to change notification settings - Fork 14
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
Conversation
I saw your issue and told myself that I will reply to it when I have the
time, I'm busy with school.
IMO I think that shipping your script with windowchef would be the better
approach, it would also serve as an example for windowchef's capabilities.
Now I feel sorry that you actually got to implement this in the wm itself
;). I checked the code and it seems good, you added the json properties
too, great job.
I didn't try neither the script nor this implementation, I don't know if
there any advantages/disadvantages. With that said, I think that, if there
are no disadvantages, this feature should not be shipped in the wm itself,
but as a script. I hope you learned along the way of implementing this.
Sorry for being late.
…On Wed, 19 Sep 2018, 01:50 vxid, ***@***.***> wrote:
Following issue #56 <#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).
------------------------------
You can view, comment on, or merge this pull request online at:
#57
Commit Summary
- Add grid properties, movements and resizing
File Changes
- *M* client.c
<https://github.com/tudurom/windowchef/pull/57/files#diff-0> (2)
- *M* ipc.h
<https://github.com/tudurom/windowchef/pull/57/files#diff-1> (2)
- *M* man/waitron.1
<https://github.com/tudurom/windowchef/pull/57/files#diff-2> (10)
- *M* man/waitron.1.md
<https://github.com/tudurom/windowchef/pull/57/files#diff-3> (8)
- *M* types.h
<https://github.com/tudurom/windowchef/pull/57/files#diff-4> (9)
- *M* wm.c <https://github.com/tudurom/windowchef/pull/57/files#diff-5>
(122)
Patch Links:
- https://github.com/tudurom/windowchef/pull/57.patch
- https://github.com/tudurom/windowchef/pull/57.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#57>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKNZTI7IXxUs7bC2nquSWZelsrWds4zTks5ucXjRgaJpZM4Wu97i>
.
|
If this implementation has advantages that cannot be made into a script then I may change my mind. |
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. |
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:
Functions
Two new waitron functions:
window_resize_in_grid
to resize windows with grid stepswindow_move_in_grid
to move a window with grid stepsThese 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).