Re: [e-users] E17 Feature request - keybindings

2006-08-15 Thread J. Erik Heinz
Hi, 

Fernando Gerent <[EMAIL PROTECTED]> words
on 12.07.2006 - 10:34 (-0300 Zulu-Time):

>Of course I'll have to test the behavior for each process, like the
>firefox/firefox-bin you mentioned. But the script won't need to do the
>(in my opinion) hardest part, of finding out the pid for that specific
>window I want, the pid will already be defined inside each script.
>So now what I really need is to find out how to send a signal to focus
>a window (given that I know the window's pid or process name), maybe
>someone can help me with that.
@ e16: 
eesh window_list
could be your friend. With the information provided there you could focus the 
window with:
eesh win_op  focus

For more information see: eesh help win_op

Another approach that I use is, every virutal desktop contains one
application, ie: Desk1 Shell, Desk2 Firfox, Desk3 Thunderbird
With this setup you can switch to the application by switchting to the
right desktop -- But I like your approach as well ;)

Cheers -- Erik 
-- 
J. Erik Heinz
Keyboard-samuraing in process

:: All non-mailinglist mail to this emailadress will be deleted.

OpenBC: https://www.openbc.com/hp/JErik_Heinz
Blog: http://jerik.blogspot.com

-
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


Re: [e-users] E17 Feature request - keybindings

2006-07-12 Thread Fernando Gerent
Absolutely. By the way, thanks to you and all the developers for doing
such a wonderful job. I just dropped KDE, and have been checking out
all the other options, and from the moment I first started E17 I knew
there was no way back. It still amazes me everytime, and I'm still
tweaking it and discovering all the great stuff.
Like I said before, now I'm gonna try to create scripts, one
for each app I want, for checking if the app is running and then
launching/focusing it, and then create a keybinding to exec
"firefox-script", for example.
Of course I'll have to test the behavior for each process, like
the firefox/firefox-bin you mentioned. But the script won't need to do
the (in my opinion) hardest part, of finding out the pid for that
specific window I want, the pid will already be defined inside each
script.
So now what I really need is to find out how to send a signal to
focus a window (given that I know the window's pid or process name),
maybe someone can help me with that.On 7/11/06, The Rasterman Carsten Haitzler <[EMAIL PROTECTED]> wrote:
On Tue, 11 Jul 2006 14:33:22 -0300 "Fernando Gerent" <
[EMAIL PROTECTED]>babbled:not so easy. for example - on debian firefox is a script - that does soem setupthen exec's firebox-bin. so you execute "firefox" as your application and what
is the process name you end up with? "firefox-bin"!!!. a prominent example ofhow hackery would break down here. now other programs often do similar things -you run prog X but the ui is actually from a child process with a different
name - and *IF* the app is nice enough to provide a app command property on thewindow (*IF*) the command is the child process name, not the parent youexecuted. *IF the app is nice enough to provide a pid property - then the pid
is not the pid you launched. it's a minefield to map an arbitrary commandstring to an actual window - it's not reliable and it's fraught with "it wontwork for app X or app Y" exceptions. at this stage with e i don't want to  be
putting in unreliable hacks like this before a lot of other core features andcode are done and solidified. i hope you understand the position that a solidbase is more important than this.> Would I need both the pid and the process name?
> Cause the process name wouldn't be much of a problem, just a question of> trial and error, for those apps that launch multiple processes.> Also, maybe I wasn't clear enough, but I'm planning on creating one script
> for each app, not a global script that does it all by itself, all I need is> the signal that is used, so I can do "focus on firefox" on the firefox> script, "focus on thunderbird" on the thunderbird script, etc..., not a
> general "focus on $pid".>> On 7/11/06, Jesse Luehrs <[EMAIL PROTECTED]> wrote:> >> >  Original message > > >Date: Tue, 11 Jul 2006 13:27:43 -0300
> > >From: "Fernando Gerent" <[EMAIL PROTECTED]>> > >Subject: Re: [e-users] E17 Feature request - keybindings> > >To: Josh <
[EMAIL PROTECTED]>> > >Cc: enlightenment-users@lists.sourceforge.net> > >> > >   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.> >> > ps w -eo 'comm' | grep -qE "^${PROGNAME}$"> >> > that will return successfully if ${PROGNAME} is running and
> > with a failure code if it is not (no guarantees on the> > portability of that... I know it works on Linux).> >> > >   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.> >> > The problem isn't in sending the signal... that would be
> > fairly trivial (as you mentioned, clicks and alt+tab do it> > already). The really difficult part is figuring out which> > windows go with which pids/process names.> >> > >   Thanks everyone for the replies so far.
> > >> > >   Fernando> >> >> > --

Re: [e-users] E17 Feature request - keybindings

2006-07-11 Thread The Rasterman
On Tue, 11 Jul 2006 14:33:22 -0300 "Fernando Gerent" <[EMAIL PROTECTED]>
babbled:

not so easy. for example - on debian firefox is a script - that does soem setup
then exec's firebox-bin. so you execute "firefox" as your application and what
is the process name you end up with? "firefox-bin"!!!. a prominent example of
how hackery would break down here. now other programs often do similar things -
you run prog X but the ui is actually from a child process with a different
name - and *IF* the app is nice enough to provide a app command property on the
window (*IF*) the command is the child process name, not the parent you
executed. *IF the app is nice enough to provide a pid property - then the pid
is not the pid you launched. it's a minefield to map an arbitrary command
string to an actual window - it's not reliable and it's fraught with "it wont
work for app X or app Y" exceptions. at this stage with e i don't want to  be
putting in unreliable hacks like this before a lot of other core features and
code are done and solidified. i hope you understand the position that a solid
base is more important than this.

> Would I need both the pid and the process name?
> Cause the process name wouldn't be much of a problem, just a question of
> trial and error, for those apps that launch multiple processes.
> Also, maybe I wasn't clear enough, but I'm planning on creating one script
> for each app, not a global script that does it all by itself, all I need is
> the signal that is used, so I can do "focus on firefox" on the firefox
> script, "focus on thunderbird" on the thunderbird script, etc..., not a
> general "focus on $pid".
> 
> On 7/11/06, Jesse Luehrs <[EMAIL PROTECTED]> wrote:
> >
> > ---- Original message 
> > >Date: Tue, 11 Jul 2006 13:27:43 -0300
> > >From: "Fernando Gerent" <[EMAIL PROTECTED]>
> > >Subject: Re: [e-users] E17 Feature request - keybindings
> > >To: Josh <[EMAIL PROTECTED]>
> > >Cc: enlightenment-users@lists.sourceforge.net
> > >
> > >   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.
> >
> > ps w -eo 'comm' | grep -qE "^${PROGNAME}$"
> >
> > that will return successfully if ${PROGNAME} is running and
> > with a failure code if it is not (no guarantees on the
> > portability of that... I know it works on Linux).
> >
> > >   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.
> >
> > The problem isn't in sending the signal... that would be
> > fairly trivial (as you mentioned, clicks and alt+tab do it
> > already). The really difficult part is figuring out which
> > windows go with which pids/process names.
> >
> > >   Thanks everyone for the replies so far.
> > >
> > >   Fernando
> >
> >
> > -
> > 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
> >
> 


-- 
- 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


Re: [e-users] E17 Feature request - keybindings

2006-07-11 Thread Fernando Gerent
Would I need both the pid and the process name?Cause the process name wouldn't be much of a problem, just a question of trial and error, for those apps that launch multiple processes.Also, maybe I wasn't clear enough, but I'm planning on creating one script for each app, not a global script that does it all by itself, all I need is the signal that is used, so I can do "focus on firefox" on the firefox script, "focus on thunderbird" on the thunderbird script, etc..., not a general "focus on $pid".
On 7/11/06, Jesse Luehrs <[EMAIL PROTECTED]> wrote:
 Original message >Date: Tue, 11 Jul 2006 13:27:43 -0300>From: "Fernando Gerent" <[EMAIL PROTECTED]>>Subject: Re: [e-users] E17 Feature request - keybindings
>To: Josh <[EMAIL PROTECTED]>>Cc: enlightenment-users@lists.sourceforge.net>>   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.ps w -eo 'comm' | grep -qE "^${PROGNAME}$"that will return successfully if ${PROGNAME} is running andwith a failure code if it is not (no guarantees on the
portability of that... I know it works on Linux).>   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.The problem isn't in sending the signal... that would befairly trivial (as you mentioned, clicks and alt+tab do italready). The really difficult part is figuring out which
windows go with which pids/process names.>   Thanks everyone for the replies so far.>>   Fernando-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 easierDownload 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.nethttps://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


Re: [e-users] E17 Feature request - keybindings

2006-07-11 Thread Jesse Luehrs
 Original message 
>Date: Tue, 11 Jul 2006 13:27:43 -0300
>From: "Fernando Gerent" <[EMAIL PROTECTED]>  
>Subject: Re: [e-users] E17 Feature request - keybindings  
>To: Josh <[EMAIL PROTECTED]>
>Cc: enlightenment-users@lists.sourceforge.net
>
>   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.

ps w -eo 'comm' | grep -qE "^${PROGNAME}$"

that will return successfully if ${PROGNAME} is running and
with a failure code if it is not (no guarantees on the
portability of that... I know it works on Linux).

>   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.

The problem isn't in sending the signal... that would be
fairly trivial (as you mentioned, clicks and alt+tab do it
already). The really difficult part is figuring out which
windows go with which pids/process names.

>   Thanks everyone for the replies so far.
>
>   Fernando


-
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


Re: [e-users] E17 Feature request - keybindings

2006-07-11 Thread Fernando Gerent
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.FernandoOn 7/11/06, Josh <[EMAIL PROTECTED]> wrote:
A better method would be to write your own shell script to handlethis.  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)endIf you can't focus the program, you can at least stop it from opening
a new window with a similar script.-josh/krazykitOn 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 easierDownload 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.nethttps://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


Re: [e-users] E17 Feature request - keybindings

2006-07-11 Thread Josh
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


Re: [e-users] E17 Feature request - keybindings

2006-07-11 Thread The Rasterman
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