New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: minimize window on suspend #1971
feat: minimize window on suspend #1971
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all, thank you!
Then, I'm not entirely sure about the interaction which is done with the command here and the already existent g:neovide_fullscreen
variable. The advantage I see behind the variable is that it's not necessary to keep track of the variable separately if a more special scripted behavior is desired. At the moment it even looks like it's not possible to return from the minimized state.
On the other hand it'd be also kind of fair to say that returning from minimization must be done through the user, or through platform specific APIs in a separately running script.
I just noticed that the UI protocol provides suspend https://neovim.io/doc/user/ui.html. So I think a better implementation is to hook into that, sorry for misleading you @SyedAhkam |
In that case we do not need to expose a custom command right? Also reading the documentation for |
That's correct, no custom command is needed, we just need to react to it, like we do for other UI events. The users can still bind I think for now, it's safe to assume minimizing the window. But I think the end goal would be to check if we started with |
Thanks for the direction. I have now reverted the change which added a custom We can now discuss about doing 'real suspend' further. |
Do you want to rebase/merge main into this? Or should I do it? |
I'll do it now then. |
f28baa2
to
3163043
Compare
Thank you! Choooooooooo choooooooo 🚂 |
What kind of change does this PR introduce?
A feature! Hooks into
:suspend
, interprets it as aMinimize
request and minimizes the window.Fixes: #1496
Did this PR introduce a breaking change?
No