<div class="gmail_quote">On Tue, Oct 4, 2011 at 12:27 PM, Jorge Almeida <span dir="ltr"><<a href="mailto:jjalmeida@gmail.com">jjalmeida@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Tue, Oct 4, 2011 at 9:18 AM, Manolo Martínez<br>
<<a href="mailto:manolo@austrohungaro.com">manolo@austrohungaro.com</a>> wrote:<br>
><br>
> It would be nice to improve this solution in at least the following respect: when<br>
> editing a message in mutt, vim takes over and the window changes title, so that<br>
> wmctrl no longer recognises it. Taking<br>
> "-F" out would take care of that ("mutt" is part of the window title when vim<br>
> edits a mutt file), but with the drawback that if I were editing<br>
> , say, .muttrc, Alt+F5 would be fooled into raising *that* window. But, oh well, I think the<br>
> instruction as it stands is idiotproof enough for my own level of idiocy.<br>
><br>
<br>
</div>One idea that comes to mind is to edit the config of mutt in the place<br>
where you tell it what editor to use. Maybe you could tell mutt to use<br>
something like<br>
/usr/bin/vim +c 'set title titlestring="Mutt"'<br>
I tried this from a terminal and it doesn't works as expected: the title<br>
becomes "set title...". You still get the string "Mutt", and so I guess<br>
it would work if you use something like "Muttwindow" to distinguish it<br>
from a window where .muttrc is being edited. But it's an ugly hack.<br>
What happens is that vim is following the behavior of bash: it puts the<br>
name of the command executed, or the current directory, if no command<br>
was provided, as title. Before entering interactive mode, bash<br>
executes the command contained in the env variable PROMPT_COMMAND, if<br>
set. In ArchLinux, it is set by /etc/bash.bashrc, and is an "echo<br>
some-stuff-with-escape-codes". I had to comment it<br>
out, and I think it was a bad idea, anyway. In vim, I don't know what<br>
configuration is causing this. Maybe someone else have some clue?<br></blockquote><div><br></div><div>Unless I missed some important context.. use the terminal's name to find it instead of the title?</div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Cheers<br>
<font color="#888888"><br>
J.A.<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
openbox mailing list<br>
<a href="mailto:openbox@icculus.org">openbox@icculus.org</a><br>
<a href="http://icculus.org/mailman/listinfo/openbox" target="_blank">http://icculus.org/mailman/listinfo/openbox</a><br>
</div></div></blockquote></div><br>