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

Smart window placement #269

Closed
romildo opened this Issue Jan 10, 2016 · 5 comments

Comments

Projects
None yet
3 participants
@romildo

romildo commented Jan 10, 2016

Smart window placement chooses the best place to position a window in the screen based on the available free screen areas. It chooses a position which minimizes window overriding. It is an option on several window managers, like Openbox, xfwm, fluxbox, Enlightenment, and others. It makes the desktop easy to work with because the user has not to reposition windows as much as with other placement algorithms like centred and cascaded.

The algorithm should not be that difficult to be implemented. It would collect rectangles of free spaces on the screen and sort them by size (let's say by their area), choosing one where the window would best fit.

It would be very nice if JWM could have this placement option too.

@joewing

This comment has been minimized.

Show comment
Hide comment
@joewing

joewing Jan 10, 2016

Owner

JWM has a window placement policy to place windows with no overlap. Of course it falls back to the default policy if no position is available. It’s available as a Group option, so you can do something like:

<Group>
    <Option>tiled</Option>
</Group>

An improved placement policy to minimize overlap would be nice to have.

Owner

joewing commented Jan 10, 2016

JWM has a window placement policy to place windows with no overlap. Of course it falls back to the default policy if no position is available. It’s available as a Group option, so you can do something like:

<Group>
    <Option>tiled</Option>
</Group>

An improved placement policy to minimize overlap would be nice to have.

@joewing joewing added the enhancement label Jan 10, 2016

@romildo

This comment has been minimized.

Show comment
Hide comment
@romildo

romildo Jan 10, 2016

I had found the tiled option before, but it is not satisfactory yet because as soon as there is no position where the window could be positioned without covering any other windows, it falls back to the default cascaded placement.

The smart placement can be an enhancement to the tiled placement where the default placement is not used in that circumstance. Instead it would find a position where the window would benefit from any area of desktop that is still unused. It would still cover parts of other windows, but in a minimized way.

If there is absolutely no free desktop area available, it could use a random positioning (like Openbox).

romildo commented Jan 10, 2016

I had found the tiled option before, but it is not satisfactory yet because as soon as there is no position where the window could be positioned without covering any other windows, it falls back to the default cascaded placement.

The smart placement can be an enhancement to the tiled placement where the default placement is not used in that circumstance. Instead it would find a position where the window would benefit from any area of desktop that is still unused. It would still cover parts of other windows, but in a minimized way.

If there is absolutely no free desktop area available, it could use a random positioning (like Openbox).

joewing added a commit that referenced this issue Jan 15, 2016

@joewing

This comment has been minimized.

Show comment
Hide comment
@joewing

joewing Jan 15, 2016

Owner

As of snapshot 1366, the tiled option will attempt to find the location with the least overlap if it can't find a location with no overlap. If you have a chance to try it out, please let me know what you think!

Owner

joewing commented Jan 15, 2016

As of snapshot 1366, the tiled option will attempt to find the location with the least overlap if it can't find a location with no overlap. If you have a chance to try it out, please let me know what you think!

@joewing joewing added this to the Version 2.3.5 milestone Jan 15, 2016

@romildo

This comment has been minimized.

Show comment
Hide comment
@romildo

romildo Jan 15, 2016

I have tried and liked it. Thanks.

romildo commented Jan 15, 2016

I have tried and liked it. Thanks.

@joewing joewing closed this Jan 15, 2016

@rdnvndr

This comment has been minimized.

Show comment
Hide comment
@rdnvndr

rdnvndr Jan 15, 2016

Contributor

It works.

Contributor

rdnvndr commented Jan 15, 2016

It works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment