Skip to content
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

Minimize on ctrl+z #1496

Closed
W4RH4WK opened this issue Aug 20, 2022 · 4 comments · Fixed by #1971
Closed

Minimize on ctrl+z #1496

W4RH4WK opened this issue Aug 20, 2022 · 4 comments · Fixed by #1971
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Good options for hactoberfest contributions. Not exclusive

Comments

@W4RH4WK
Copy link

W4RH4WK commented Aug 20, 2022

Is it possible to minimize the window on ctrl+z. I quickly checked and it seems like ctrl+z doesn't do anything.

@W4RH4WK W4RH4WK added the enhancement New feature or request label Aug 20, 2022
@MultisampledNight
Copy link
Contributor

Thanks for reporting! No, that's not possible yet.

But it would be easy to implement, namely an implementing person would need to look at src/window/mod.rs, introduce a new function akin to the existing one for the fullscreen, call it appropriately and introduce a new setting in src/window/settings.rs.

Using the new setting then (which would be probably called g:neovide_minimized), you could bind it yourself using nnoremap (it's documented at :h key-mapping, which takes a key combination to map and the commands to execute. Neovide refrains from adding new keybindings which existing/switching users might expect to behave otherwise.

@MultisampledNight MultisampledNight added the good first issue Good for newcomers label Aug 21, 2022
@W4RH4WK
Copy link
Author

W4RH4WK commented Aug 21, 2022

I see. Do you think it would be possible to hook into the existing keybinding? I've tried nvim-qt, which ships with the Windows distribution of Neovim, and nvim-qt supports minimize on ctrl+z directly without the need to set a keybinding.

@MultisampledNight
Copy link
Contributor

If by "hooking into" you mean "executing on pressed" on your side, yeah, that's possible with the already mentioned map family. Though the functionality just isn't there inside of Neovide yet.

@W4RH4WK
Copy link
Author

W4RH4WK commented Aug 21, 2022

I had a quick look at neovim-qt and I think I found the corresponding code. It's an autocmd that executes a vim function that triggers the corresponding UI method:

https://github.com/equalsraf/neovim-qt/blob/7b230767dd04d921ca5c2c31ad46ffd00111aed2/src/gui/runtime/plugin/nvim_gui_shim.vim#L29-L33

@Kethku Kethku added the hacktoberfest Good options for hactoberfest contributions. Not exclusive label Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Good options for hactoberfest contributions. Not exclusive
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants