mark2devel / mark2

Minecraft Multi Server Wrapper Written in Python with Twisted; Pull Requests HIGHLY Encouraged, Collaborators Needed Discord: https://discord.gg/zymJygHNpv
Other
205 stars 44 forks source link

Option to hide stats/players on the right sidebar #145

Closed Column01 closed 2 years ago

Column01 commented 2 years ago

Discussed in https://github.com/gsand/mark2/discussions/143

Originally posted by **TomLewis** September 15, 2021 Could we get some way to toggle show/hide the players/stats on the right so we can get a full width console
Column01 commented 2 years ago

Looked into it a bit and AFAIK there is no way to mark a widget as hidden with URWID, you need to either never create it, or find some way to destroy it, which would lose its state (and likely break all the code that updates those widgets with their contents.)

Column01 commented 2 years ago

I will keep looking into it

Column01 commented 2 years ago

@TomLewis since you posted the issue, what would be a good keybinding do you think? I found a way to get it working nicely :D

In testing, I set it to f9. What do you think of this?

Column01 commented 2 years ago

Maybe f11 to mimic setting an application to fullscreen?

TomLewis commented 2 years ago

Blimey that was fast! I just jumped into my client to see if there was a conflict and F11 i already bound to full screen in MobaXterm, I use Iterm2 on mac too, but I don't have my mac with me to test for conflicts.

https://mobaxterm.mobatek.net/documentation.html https://gist.github.com/squarism/ae3613daf5c01a98ba3a

F9 dousnt seem to do much in either terminal, be nice if we could set it ourselves in a config file, and be awesome if it saves what state each minecraft servers displayed in too! it could, just put the player count next to the servers name in the top tab like

Survival (30) Creative (0) when its in that mode.

Column01 commented 2 years ago

be nice if we could set it ourselves in a config file

I'll look into it and see if this is possible, all other keybindings are not configurable at the moment though

be awesome if it saves what state each minecraft servers displayed in too!

This I think is outside the scope since each client is its own instance, mark2 would need to manage some sort of storage that persists across closing the client or have a server-wide memory of it (meaning all attached clients would have it update for them which is not ideal)

just put the player count next to the servers name in the top tab

A lot of people already have issues with a crowded top bar (a network I did admin work for went so far as to remove all characters from the server name except for a few and the last couple for the version), so I'm not planning on adding something like that

Column01 commented 2 years ago

So there isn't really a good way to implement configurable keys without breaking aspects of the UI navigations. For example, the sections regarding navigating the UI will sometimes pass the pressed key onto the UI since the underlying code for that UI widget will handle it and scroll properly. If I add a config for those, it will break that if you change your key binding. I think I'll change it back to f9 and there won't be a config for it, it's easy enough to show people how to change them in the code if there is a serious conflict.