[openbox] Launching applications

Manolo Martínez manolo at austrohungaro.com
Tue Oct 4 04:18:38 EDT 2011


On 10/04/11 at 08:28am, Jorge Almeida wrote:
> I think the OP just wants to start mutt from a key shortcut and not
> worry about remembering whether mutt is already running, so an existing
> mutt window should be raised instead of launching a new one. Of course I
> may have misunderstood, and the OP knows better.

Yes, that is what I meant, and "sh -c 'wmctrl -F -a "mutt" || urxvt -e mutt'" does exactly what I wanted -- mutt takes care of its own window title. Thanks a lot!

If I understood Anthony's point, the pseudocode in his last message was
supposed to deal with a situation in which I press my key combination twice too
fast for wmctrl to catch up. But I've tried this as fast as I can and wmctrl
always delivers.

It would be nice to improve this solution in at least the following respect: when
editing a message in mutt, vim takes over and the window changes title, so that
wmctrl no longer recognises it. Taking
"-F" out would take care of that ("mutt" is part of the window title when vim
edits a mutt file), but with the drawback that if I were editing
, say, .muttrc, Alt+F5 would be fooled into raising *that* window. But, oh well, I think the
instruction as it stands is idiotproof enough for my own level of idiocy.

Thanks again for a very instructive thread.

Manolo

Manolo


More information about the openbox mailing list