Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Gedit, if you have multiple Gedit windows open, and then open a file, Gedit chooses to open it in the most recently active window. I like this behaviour, i think it's intuitive.

In Geany, which i otherwise prefer to Gedit, the rule for which instance to use seems to be "the oldest one". What's worse, if that instance is open on another desktop, it moves that instance into your current desktop as well. This effectively makes it impossible to work with multiple Geany windows, which is really annoying.

Does anyone know of a way i can make Geany open files in the most recently active (ie "looked at") instance of Geany? I'm using the most up to date version (0.21).

thanks, max

share|improve this question
    
I've never seen Geany with more than one window open. –  Ignacio Vazquez-Abrams Apr 2 '12 at 11:29
    
In the latest version you can right click on a tab and choose "Open in new window". (again, annoyingly, it leaves it open in the original window as well as opening it in a new one) –  Max Williams Apr 2 '12 at 13:48

2 Answers 2

Using Geany 1.22 there may be a workaround which is pretty close to what you want to do.

According to the manual on http://www.geany.org/manual/current/#command-line-options you can use

--socket-file

to specify the socket file with which to communicate with the Geany instance.

Putting the following in a script will get you an instance per workspace:

#!/bin/bash
geany --socket-file=/tmp/geany-sock-$(xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}') ${1+"$@"}

(It also passes on the command line args to geany).

share|improve this answer
    
This is great. I prefer to define an "edit" function in my .XXXXrc file and also tack on '&' to let it run in the background. –  troutinator Sep 30 '13 at 16:36

Sadly there is no way to configure this behaviour. Several months ago, I asked some Geany plugin developers about this and it seems the only way to change this is to write the code yourself and send them a patch.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.