Skip to contentSkip to conversation

Feature request - Number of tunnel entries in root of tray icon context menu

DISCUSSION [email protected] 2 participants 4 messages Sep 28, 2021 – Sep 30, 2021 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

the hardcoded value is 10 (in ui/tray.go)

Wouldn't it be possible to allow a user to set this value instead of using a hardcoded one?

E.g. via:
HKEY_CURRENT_USER\SOFTWARE\WireGuard\TunnelsInRootMenu
Default is 10 and if that registry value doesn't exist, 10 is also the default

It should accept values from 0 (display all tunnels) to +x (display at maximum x tunnels)

Vertical screen space shouldn't be an issue nowadays and imho the value of 10 is a bit too limiting.

Thank you!

#1 lore raw

Hi,

I don't want to add a knob for this, but I would take a patch that uses a smarter heuristic than just "10". Feel free to send patches to the list. The code in question is here:

https://git.zx2c4.com/wireguard-windows/tree/ui/tray.go#n225

For example, if you can calculate the number of entries that can fit on the vertical height of the screen, maybe take a third? Or two fifths?

Jason

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Hi,

Apart from the problem that I'm not that much into go(lang) that I could provide such a patch myself...

I just don't see the gain that this way would yield because that would just replace one knob with another:
A registry value for a fixed amount of maximum entries or a ratio value (e.g.: 0.33 or 0.4). The ratio would require a knob as well, otherwise the next person comes and asks how to change it because it doesn't fit his needs...

Regards,
Ulf

#4 lore raw
Quoted 1 line · On Thu, Sep 30, 2021 at 5:15 AM <[email protected]> wrote:

The ratio would require a knob as well

Why?

Anyway, we're not adding knobs for any of this, as already stated. If you've got a better heuristic than "10", then by all means send a patch and I'd be happy to apply it. If you don't like "10" and you don't like percentage of the vertical resolution, then come up with a different heuristic and make a strong argument for it.