What a fantastic little app! Thanks Delcides.<br><br>I put together this shell script to do exactly what I need. Funny thing is that it's _still_ faster than the collection of applescripts I had on my mac to play/pause itunes, etc. Man I missed this level of power and speed.<br>
<br>
#!/bin/sh<br>
<br>
terminal_wm_class="gnome-terminal"<br>
terminal_exec="gnome-terminal"<br>
<br>
# no terminal started, so start one<br>
if [ -z "`wmctrl -lx | grep gnome-terminal`" ]; then<br>
$terminal_exec &<br>
else<br>
# search for existing terminals on current desktop<br>
current_desk=`wmctrl -d | grep '*' | cut -d ' ' -f 1`<br>
term_on_this_desk=`wmctrl -lx | grep "$current_desk[ ]*$terminal_wm_class" | cut -d ' ' -f 1`<br>
if [ -n "$term_on_this_desk" ]; then<br>
wmctrl -i -a $term_on_this_desk<br>
else<br>
# no terminals on current desktop, so just open the first one we find<br>
wmctrl -x -a $terminal_wm_class<br>
fi;<br>
fi;<br><br><br><div class="gmail_quote">On Tue, Apr 22, 2008 at 2:19 PM, Delcides F. Sousa Jr <<a href="mailto:delcides@gmail.com">delcides@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Tue, Apr 22, 2008 at 8:42 AM, Vaughn Dickson <<a href="mailto:vaughnd@gmail.com">vaughnd@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I'm used to Quicksilver's behaviour on Mac, where opening an application<br>
> will just give it focus if it's already open. Is there a way to do this<br>
> in openbox? Specifically for a terminal app. I have alt-e bound to open<br>
> a terminal, but I'd rather have it focus the existing one on my current<br>
> desktop/workspace.<br>
><br>
> Thanks,<br>
> Vaughn<br>
><br>
><br>
</div></div>> ---<br>
> To unsubscribe, send a blank email to <a href="mailto:openbox-unsubscribe@icculus.org">openbox-unsubscribe@icculus.org</a><br>
> Mailing list archives: <a href="http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?24" target="_blank">http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?24</a><br>
><br>
<br>
You can use wmctrl and a bit of shell script to do this.<br>
<br>
Regards,<br>
<br>
Delcides.<br>
<br>
---<br>
To unsubscribe, send a blank email to <a href="mailto:openbox-unsubscribe@icculus.org">openbox-unsubscribe@icculus.org</a><br>
Mailing list archives: <a href="http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?24" target="_blank">http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?24</a><br>
<br>
<br>
</blockquote></div><br>