From: oleksandr k. <at...@gm...> - 2007-04-05 02:13:43
|
on 04/04/2007 10:08 PM oleksandr korneta wrote: > > on 04/04/2007 04:10 PM Esteban Soler wrote: >> nice idea, i'l give it a try since i already do that to launch my apps, i >> think it may be posible with some sort of script thatchecks if there is an >> app running and if so uses wmctrl to raise and or focus the app (not sure if >> wmctrl can do that, but very posible i think) >> >> Esteban >> >> On 4/4/07, Sven Hartenstein <li...@sv...> wrote: >>> Hi, >>> >>> I use fluxbox for some years now and usually start applications with >>> mod4+CHAR. Now, it would be VERY cool if the following was possible: I >>> press such a keystroke but fluxbox (or an invoked script) would start >>> the application only it it's not running already. If it's running, it >>> would bring the application's window to the front and focus it. >>> >>> Is something like this possible with fluxbox? >>> > > the example for thunderbird I am using for a while already > > Control Mod1 t :ExecCommand if wmctrl -l | grep "Thunderbird"; then > wmctrl -R "Thunderbird"; else thunderbird; fi > > The disadvantage of this approach is that if the window is on another > workspace wmctrl brings it to the current workspace instead of (what I > would prefer) bringing me to that workspace along with bringing the > window on front. Also, it does not see the windows whcih are iconified > to the system tray, so this does not work for gaim for instance. Maybe > someone has better suggestion. ooops! sorry, answering to myself. Reading the manual carefully reveals that if wmctrl -l | grep "Thunderbird"; then wmctrl -a "Thunderbird"; else thunderbird; fi does exactly what I want. How could I miss it the first time? -- regards, Oleksandr Korneta /The nice thing about standards is that there are so many to choose from./ |