[openbox] Launching applications

Jorge Almeida jjalmeida at gmail.com
Mon Oct 3 07:57:05 EDT 2011


On Mon, Oct 3, 2011 at 11:54 AM, Manolo Martínez
<manolo at austrohungaro.com> wrote:
>
> I have a number of keybindings for launching common applications. Currently,
> say, A-F5 launches mutt in a urxvt terminal and, if I press that key
> combination twice, I get two mutt instances.
>
> Is there any way to find out whether there is already a window running mutt
> somewhere and, if so, instruct A-F5 to raise and focus that window, instead of
> launching a new one?
>

Make sure your mutt window has a descriptive title, call wmctrl to
raise it an on failure call urxvt.

Try this as command launched by your shortcut keys (untested):

sh -c 'wmctrl -F -a "Mutt" || urxvt -T "Mutt" -e /usr/bin/mutt '

HTH

J.A.


More information about the openbox mailing list