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

Command to draw focus to the neovide window #1974

Closed
IndianBoy42 opened this issue Aug 12, 2023 · 4 comments
Closed

Command to draw focus to the neovide window #1974

IndianBoy42 opened this issue Aug 12, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@IndianBoy42
Copy link

Is your feature request related to a problem? Please describe.
I would like to be able to open files in an existing neovide window (already possible due to neovim rpc), and shift the window focus to that neovide window. For example I may be performing a git commit in another terminal which would ideally open the commit msg in the existing editor. or simply using the terminal to navigate directories and projects and opening files in a global neovide instance. Again all of this is mostly possible using the neovim rpc to open files. the missing link is to send the focus to that neovide window.

Describe the solution you'd like
A neovim command :NeovideFocus that when invoked would tell neovide to tell the os/wm/wtv that the neovide window should be focused. Obviously this command would be pointless when run manually but could be invoked remotely using the rpc function nvim_command.

Describe alternatives you've considered
I'm not sure if three is, I think some level of support from the gui is necessary to implement this. For now I have to manually switch to the neovide window after opening files.

Additional context

Kitty and Wezterm both have their own control protocols that allow this kind of pulling focus that allow the workflow described above to work.

@IndianBoy42 IndianBoy42 added the enhancement New feature or request label Aug 12, 2023
@fredizzimo
Copy link
Member

This should be possible to implement in a similar way as this #1971. But we are still in progress of reviewing to see if that's the solution we will go with.

@IndianBoy42
Copy link
Author

Ah yes that is similar. Actually the variable based workflow could work too, and it would double as a variable for checking whether the neovide window is focused or not.

Something I just thought of related to window control is whether neovide has plans to support multiple windows into the same neovim instance ever? It would potentially be useful for multi monitor support or and just beingore flexible with using monitor space. I bring it up because then all of these windowing controls (focus, minimize, fullscreen etc) need to take arguments or be dictionaries

@fredizzimo
Copy link
Member

Something I just thought of related to window control is whether neovide has plans to support multiple windows into the same neovim instance ever?

We want to support that, but it's currently unclear how to do it. We need this or something similar to make it work neovim/neovim#7541.

@Kethku
Copy link
Member

Kethku commented Sep 29, 2023

Completed by #2058

@Kethku Kethku closed this as completed Sep 29, 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
Projects
None yet
Development

No branches or pull requests

3 participants