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 option to define position, size and offset of new windows (not specific to which window it is) #182

Open
andr222 opened this issue Aug 13, 2019 · 7 comments · May be fixed by #222
Open

Comments

@andr222
Copy link

andr222 commented Aug 13, 2019

Currently opening a new window in tabfern seems to use the position and size of the last window closed, with an offset.
If the last window closed had an unusual position or size, the new window will open at that usual and likely unwanted position and size, with an offset.
(Issue #18 gives a workaround to correct a weird position and size, but always gives an offset on new windows)
By explicitly defining the preferred position, size, and offset, unwanted locations are readily avoided.

In my case it would be preferred that all windows open in exactly the same position and size, with no offset. Excepting of course the tabfern window, which if always left open, will guard its' position and size.
Users generally have one or more bars listing open applications, which allows switching between overlaid open windows, as well as using the tabfern window.

My system : Mageia (Linux) with Maté desktop.
Such an option should work with all graphic systems, including Linux, MsWindows, and Apple ios.

It might be preferable to add this option in the Chromium code, but failing that, putting it in tabfern would fully satisfy my needs.

@cxw42
Copy link
Owner

cxw42 commented Aug 13, 2019

Thanks! I don't have any Chromium development experience, but I think this is reasonably within scope for TF (or a plug-in, once the TF plug-in system is designed and implemented).

@cxw42 cxw42 added the hacktoberfest Issues I think are good for Hacktoberfest participants label Sep 23, 2019
@cxw42 cxw42 removed the hacktoberfest Issues I think are good for Hacktoberfest participants label Dec 28, 2019
@csabag csabag linked a pull request Aug 6, 2020 that will close this issue
@csabag
Copy link

csabag commented Aug 7, 2020

I made a stab at the window size & position problem.
My approach was to create two separate controls in settings/behaviour tab.

  1. window size preference with a simple text field that will force all normal windows to resize themselves upon creation to the user defined size.
  2. window position preference again with simple text field.
    The text field is validated with regex and follows the format of 2 numbers separated with ':' character and optionally having a + in front of the numbers. E.g. +22:+22 or 50:50
    The '+'-ed version is going to apply the values as an x,y offset to the previously focused window (tabfern pop window is excluded I think)
    The non-'+'-ed format is a fixed position on the screen where the top left corner of the window will be.

I also tried to look into adding an option where the last recently used window's size would be the default new window position, but I couldn't come up with a good reliable solution.
Note, that with the #18 workaround works with the my offset feature.
If you disable the fixed window size and enable only the window position offset and set it to +0:+0 then the next window with open exactly on top of the most recently focused window.

Let me know if you have any comments or questions...

@cxw42
Copy link
Owner

cxw42 commented Aug 14, 2020

@csabag Thanks for the work and PR! I'll take a look!

@andr222
Copy link
Author

andr222 commented Aug 15, 2020

@csabag
Your approach looks good. It should accomodate a variety of preferences.
Hopefully it does indeed exclude the tabfern popup window.
Thanks for your work :)

@andr222 andr222 closed this as completed Aug 15, 2020
@andr222 andr222 reopened this Aug 15, 2020
@andr222
Copy link
Author

andr222 commented Aug 15, 2020

mis-click. Didn't mean to close issue

@HikariWS
Copy link

HikariWS commented Nov 3, 2020

That'd be great.

I've been using WindowManager to handle windows placements. It doesn't work for multiple windows of the same browser, because they all use the same program exe and their title is current tab's title.

It'd be awesome if TabFern was able to place its remembered windows on their proper position and size, which would need to be set. In that case, don't forget multi monitor and negative positions!

An even better solution is to set each window's title as its TabFern name. I have no idea if chromium allows extensions to set windows titles. If that's possible, then WindowManager would be able to find each of them and place them accordingly.

@cxw42
Copy link
Owner

cxw42 commented Dec 18, 2020

@HikariWS Do you mean saving and restoring each window's position and size individually? If so, please open a new issue for that (I don't see one open already). Thanks!

@cxw42 cxw42 changed the title add option to define position, size and offset of new windows add option to define position, size and offset of new windows (not specific to which window it is) Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants