Skip to content

[Question/Request] Possible to get actual Window title along with the window class passed into the Lua script?

Hey there,
I am wondering if there happens to exist a way to get the Window title captured and exposed to the Lua script, along with the wm_class?

The reason being, one of the first usages of this project I was testing was using midi pedal input within neovim, but the only thing currently available is wm_class: Alacritty, regardless of what I have open in the current terminal, so there is no way to easily tell if I am using neovim or not, or what is running in each terminal.

There could be workarounds, such as setting an env var upon opening neovim, or perhaps having a secondary monitoring application set the var outside of m2i, so that I can check that from within the m2i script but that is definitely not ideal. If there was a way to expose the window title directly to the m2i lua script, that would be most helpful.
Ex: having WM_NAME would then allow for me to have access to the following in the script: WM_NAME: nvim /path/to/file

If this is not currently possible, I would like to recommend it as a possible feature addition, if you don't mind requests.
Thanks,

Edited by instance.id