[openbox] Launching applications

Jorge Almeida jjalmeida at gmail.com
Tue Oct 4 13:14:55 EDT 2011


On Tue, Oct 4, 2011 at 5:49 PM, Dana Jansens <dana at orodu.net> wrote:
> On Tue, Oct 4, 2011 at 12:27 PM, Jorge Almeida <jjalmeida at gmail.com> wrote:
>>
>> On Tue, Oct 4, 2011 at 9:18 AM, Manolo Martínez
>> <manolo at austrohungaro.com> wrote:
>> >
>> > 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.
>> >
>>
>> One idea that comes to mind is to edit the config of mutt in the place
>> where you tell it what editor to use. Maybe you could tell mutt to use
>> something like
>>        /usr/bin/vim +c 'set title titlestring="Mutt"'
>> I tried this from a terminal and it doesn't works as expected: the title
>> becomes "set title...". You still get the string "Mutt", and so I guess
>> it would work if you use something like "Muttwindow" to distinguish it
>> from a window where .muttrc is being edited. But it's an ugly hack.
>> What happens is that vim is following the behavior of bash: it puts the
>> name of the command executed, or the current directory, if no command
>> was provided, as title. Before entering interactive mode, bash
>> executes the command contained in the env variable PROMPT_COMMAND, if
>> set. In ArchLinux, it is set by /etc/bash.bashrc, and is an "echo
>> some-stuff-with-escape-codes". I had to comment it
>> out, and I think it was a bad idea, anyway. In vim, I don't know what
>> configuration is causing this. Maybe someone else have some clue?
>
> Unless I missed some important context.. use the terminal's name to find it
> instead of the title?
>

I'm not sure I understand, but if you mean something like "urxvt -name
Mutt", how to use wmctrl to raise it? "wmctrl -a <WIN>" works as long as
<WIN> contains a string we know of in advance, and the string must be
contained in the window title. Any other alternative?

J.A.


More information about the openbox mailing list