zjstatus icon indicating copy to clipboard operation
zjstatus copied to clipboard

Ability to hide or auto-hide status bar after timeout?

Open multivac61 opened this issue 2 years ago • 9 comments

Thank you for this beautiful plugin. I want to ask if it is possible to hide the statusbar using a shortcut? Alternatively auto-hide it after x seconds.

Best!

multivac61 avatar Nov 02 '23 09:11 multivac61

Hey,

thanks for your kind words.

Unfortunately I think it won't be possible to hide the statusbar with a shortcut from within zjstatus. Plugins are only allowed to process keys, that are directly sent into their pane. Otherwise plugins would be able to read passwords or other sensitive information, which implies a critical impact on the security. Therefore we cannot achieve it from within the plugin.

Hiding it after X seconds might be possible. zjstatus will then only pop up on certain events (like changing the mode, creating a pane/tab). Would this fit into your use case?

dj95 avatar Nov 05 '23 09:11 dj95

Auto hide would be amazing!

multivac61 avatar Nov 05 '23 20:11 multivac61

I've tried to implement the behaviour, but came across a bug within rendering. Auto hiding can be finished, when the following bug is resolved: https://github.com/zellij-org/zellij/issues/2949

dj95 avatar Nov 18 '23 10:11 dj95

Together with the pipes feature and the upcoming zjstatus feature of remote control it would also be possible to implement a shortcut for hiding zjstatus. The only thing preventing me from implementing this is the still open rendering issue :/

dj95 avatar Apr 09 '24 08:04 dj95

Glitches appears or something else?

roland-5 avatar Apr 10 '24 07:04 roland-5

Yes @roland-5 , like in the screenshots of the linked zellij issue. There are weird glitches in the complete terminal, when a pane is hidden, that is specified in a layout file.

dj95 avatar Apr 10 '24 13:04 dj95

Thanks to this comment (https://github.com/zellij-org/zellij/issues/2949#issuecomment-2251279874), I was able to implement the feature. There are just some problems with the focus after showing zjstatus again. Another problems might be race conditions, when pipes to zjstatus are called to quickly after another (which could be invoked by shortcuts).

https://github.com/user-attachments/assets/76a0e648-bbfa-4419-b00a-e8bc3742590c

dj95 avatar Jul 26 '24 10:07 dj95

Sorry for the long silence and still not finishing the pull request.

While testing with the new zellij release, I found issues with the lay outing. As soon as a new pane enters the tab, zjstatus will be positioned randomly in the layout. As long as you don't create/destroy panes, it does work quite well.

However, I don't really want to publish a half-broken feature, that will break depending on the usage. Thus we, unfortunately need to wait until there is a proper solution on the zellij side.

Sorry for the disappointment, that I teasered this feature, but could not finish it due to these kind of limitations and bugs. I hope you enjoy using zjstatus, even if it will still take some time for this feature to land.

dj95 avatar Nov 30 '24 13:11 dj95

Thanks for the update. Don't worry, it doesn't diminish my enjoyment of zjstatus at all. If zellij will one day allow this to be implemented without errors, it will be great, and if not, the world won't collapse because of it.

roland-5 avatar Dec 03 '24 11:12 roland-5