I was just thinking about that.
It kind of complements this other thing I've been planning to do, that's storing my app preferences, whenever possible, on scripts, using the command arguments, instead of editing the config files. This makes it much easier to restore them in a reinstall, and overrides any global config file that may be changed in an upgrade.
I just have no idea how I can check if a program is running, althought I'm pretty sure it can be done.
As for the focus, it's probably possible, maybe I can use the signal used by "mouse click on window title" or "Alt+Tab" to bring up the program. Maybe someone around here could help me find exactly what it is.
Thanks everyone for the replies so far.

Fernando

On 7/11/06, Josh <[EMAIL PROTECTED]> wrote:
A better method would be to write your own shell script to handle
this.  Though I'm not terribly good at scripting (and someone may be
able to write a real one), I can throw out some psuedocode:

if (program is running)
then (focus program {can you do this from the command line?})
else (open program)
end

If you can't focus the program, you can at least stop it from opening
a new window with a similar script.

-josh/krazykit

On 7/11/06, The Rasterman Carsten Haitzler <[EMAIL PROTECTED]> wrote:
> On Tue, 11 Jul 2006 10:48:41 -0300 "Fernando Gerent" < [EMAIL PROTECTED]>
> babbled:
>
> a lot harder than you think- mapping an execution command to a window on your
> screen... a lot harder and very buggy and likely not to work with a LOT of
> programs.
>
> > Hi,
> >
> > I'm not even sure if that's possible at all, just an idea:
> >
> > It would be nice to be able to "share" a keybinding between 2 different
> > functions, related to the same application.
> > For example, I use a lot of keybindings for launching apps. For some apps,
> > like Eterm, I'll usually have several instances open, and every time I hit
> > Ctrl+Alt+Ins, E17 launches a new one, that's OK.
> > But for apps like Firefox, Thunderbird, xine, etc.., I'll only want one
> > window for each of these, at all times. So, when I press the keybinding for
> > Firefox, for example, and Firefox is already open, I'd like to have the
> > focus on Firefox. So, everytime I want to use Firefox I press the same
> > keybinding, and E17 would either focus it, or open it (in case it's not
> > open).
> >
> > This could be configured, for example, by a checkbox when you're creating or
> > editing any "exec" keybinding. Something like "If already running, focus app
> > instead of opening a new one".
> >
> > Thanks,
> >
> > Fernando
> >
>
>
> --
> ------------- Codito, ergo sum - "I code, therefore I am" --------------
> The Rasterman (Carsten Haitzler)    [EMAIL PROTECTED]
> 裸好多
> Tokyo, Japan (東京 日本)
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> enlightenment-users mailing list
> enlightenment-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-users
>


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-users mailing list
enlightenment-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-users

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-users mailing list
enlightenment-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-users

Reply via email to