unison
unison copied to clipboard
Better default height
I love unison (I've been using it for over ten years) but one thing that has always bugged me is the fact that it always shows up with the same window size, particularly the window height, and doesn't remember whatever height I set.
This is problematic because the listview containing the items to be synced (before you press "Go") very rarely contains fewer than two dozen items; more often than not it will require scrolling, and scrolling, especially in a small window height, is counterproductive (see also this article about avoiding scrolling ...). I would want at least the window height to be as big as possible so that you can fit more info in each scrolled "screen", and that scrolling would need less mouse wheel turns.
In the case of unison, since the contents are always pretty tall, I would suggest a simpler algorithm; instead of trying to calculate the height "based on the contents": I would suggest you just set the window height to match the computer monitor's height, maybe with 50-150 pixels less or so (or maybe in wxwidgets, like in GDK/gtk, you have a way to get the available screen height without the system's docks/panels/etc.). Alternatively you could remember the height set by users, but that's not strictly necessary.
For this to work, the height must be set before the window is shown with show() or show_all() (or whatever the method would be in wxwidgets). And since you're just setting the height property instead of a "requested_height" or "minimum_height" property, the window is still flexible.
Thanks!
Have you tried the "height" preference (can be given on command line and in a profile)? It's not ideal but maybe it works for you. Just set it to something like 30 or 40 (it's given in rows) and see if it makes a difference.
Unfortunately, it was broken in 2.51.5. Hopefully it is fixed in the next release.
I think that there is a more general problem here:
-
Not just the height, but also the width of the application window is often non-optimal. For instance, on a netbook with a small display, I get an initial window that is not large enough to show all the toolbar buttons.
-
Many window managers (including kde's kwin) support the concept of "window rules" that lets the window manager adjust many properties of the windows based on some application matching. For instance, rules can be used to adjust the initial window size or to remember the window size when an application is closed to re-apply it when it is opened again. Unfortunately these appear not to work with unison.
At least this is what I see with kde plasma 6.0.5 with a wayland session.
@callegar It not working with kde/wayland is interesting. It would be good to try with X and something less complicated with kde. Next would be to understand the x protocol mechanisms for how the default setting is done and trace through the steps to see what goes wrong. There may be some missing steps from the unison side that are part of the window-defaults sub-protoocol, or it may be an issue in ocaml-gtk3, or of course something else. (It is going to take someone who is willing to figure that out to make progress here.)
- Not just the height, but also the width of the application window is often non-optimal. For instance, on a netbook with a small display, I get an initial window that is not large enough to show all the toolbar buttons.
Please provide more details, like the version you are using, screen resolution and a scaling factor you are using, any screenshots if possible.
- Many window managers (including kde's kwin) support the concept of "window rules" that lets the window manager adjust many properties of the windows based on some application matching. For instance, rules can be used to adjust the initial window size or to remember the window size when an application is closed to re-apply it when it is opened again. Unfortunately these appear not to work with unison.
Unfortunately, Unison GUI is a GTK application, so I'm not sure if what you want is possible at all. Can you confirm that these window rules work with other GTK applications? (And if so, do these work for all, except Unison?)