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.
I did not resolve the bug using Nautilus. Thanks to frlan's help though using Thunar as an alternative works great. There are better guides exising on the internet, but all I did was install thunar[1]
sudo aptitude install thunar
then set it as my default via another package which I had to install in order to run exo-preferred-applications[2]
sudo aptitude install exo-utils
exo-preferred-applications
I'm not going to keep the links up to date - so if they are broken just do a quick google search. There are plenty of resources surrounding this topic.