neovim-remote
neovim-remote copied to clipboard
Bring neovim-qt to front
Hello, Not sure if correct repo to kindly ask for a new feature (or maybe I can't read the manual?).
Would it be possible to bring neovim-qt (win32) to the front when calling nvr ? It would save me one alt-tab at each context switch :) Best
I use neither neovim-qt nor Windows and I assume bringing a GUI application to the front requires some kind of Windows-specific scripting (batch file or powershell script).
Also I'm not sure if it should be part of neovim-remote in the first place. It sounds as if you wanted a wrapper script that first calls nvr and then does some magic to bring the application to the front.
So, this won't happen unless someone else makes a PR for it. :)
Makes sense ! =) At least this wish is registered now, maybe someone with strong win32-fu can make it happen eventually.
Is there any gui of neovim for which this works?
The following script should work
#!/bin/bash
# Check if neovim-qt is running
if pgrep -x "nvim-qt" > /dev/null
then
# echo "nvim-qt is running"
# If it is, use nvr to connect to it and bring it to front
nvr --remote-tab-silent "$@"
wmctrl -a Neovim
else
# echo "nvim-qt is not running"
# If not, start a new one
nvim-qt -- --listen /tmp/nvimsocket "$@"
fi