Re: switch to window on keystroke

oleksandr korneta <[email protected]>
Newsgroups gmane.comp.window-managers.fluxbox.user
Message-ID <[email protected]>

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 <[email protected]> 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.


-- 
regards,
Oleksandr Korneta

/The nice thing about standards is that there are so many to choose from./


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.