The intended functionality should be similar to what's seen in many windows editors e.g. "open explorer here". For those unfamiliar with windows, I just want to open nautilus to the directory of the active document.
I've tried two solutions so far, both which end up opening nautilus to the correct directory but without the window activating (not coming to the front with input focus).
Solution attempt 1 - Use the pre-existing "set build commands" and run the following command instead of make
nautilus %d; xdotools windowactivate $(xdotools search --name %d)
Solution attempt 2 - Use the Lua scripting plugin
dir = geany.dirname(geany.filename())
os.execute("nautilus " .. dir .. "; xdotools windowactivate $(xdotools search --name " .. dir .. ")")
I'm not worried about multiple windows having the same name, and I've tested the xdotools script in bash and it works fine. I'm really unsure what I'm missing here. I also don't want to use the explorer side-bar as a work-around.