lanoxx / tilda

A Gtk based drop down terminal for Linux and Unix
GNU General Public License v2.0
1.26k stars 162 forks source link

Feature request: store optionally absolute width/height instead of relative percentage #459

Open whitty opened 3 years ago

whitty commented 3 years ago

I've just switched to a setup at work with a laptop + dock with two monitors attached.

The three screens have resolutions:

Whenever I dock or undock (or close the laptop lid and gnome rolls a dice and one of the monitors ends up with tilda) tilda gets blown into some odd geometry because its trying to preserve the screen percentage instead of the dimensions.

I see the config has width_percentage and height_percentage - this makes sense for people who want terminals to take 50% of their screen, but not for me who wants 80columns by ~60 lines on any given screen

lanoxx commented 3 years ago

Initially we had absolute coordinates but that did not work well either. Some time ago this changed to percentages (see 46b0cc5d4f0d3a2079496ca4b2220ab20a52d089). The main motivation was to support size updates on monitor changes (2eba9f584d18949fb8ba0c1553e1d2b8f274cc82). Imagine that tilda is moving from a large monitor to a smaller monitor, then if you have absolute sizes stored they might not actually fit on the new monitor.

Note, the position of the window is currently still in absolute pixels, I might eventually also switch that to percentages.

Supporting what you are asking is difficult, because columns and lines also depends on the font size used and maybe also by the DPI of each monitor (not sure). If you submit a merge request with an initial implementation I will be happy to review it, but otherwise this is not on my list of priorities right now.

whitty commented 3 years ago

Thanks for the response - I had a bit of a play around in trying to make a hacked up version - I'll continue thinking about it whenever it bothers me

(workaround seems to be go into lock-down and not need to undock the laptop :-/)