On Wed, Jul 18, 2001 at 03:14:28PM +0200, Gregor Hoffleit wrote:
>     echo -ne "\033]2;MUTT - $MBOX\007" 1>&2
> 
> I started with a "folder-hook . source ~/bin/mutt-xtitle" where
> mutt-xtitle was a shell script with a command like the one above. That
> somehow worked, but I haven't found any way to detect the name of the
> mbox that's currently opened, and to pass this name to the shell script.

I think I may have found a solution for this idea.  I patched mx.c to
set the current folder in the environment (attached).  Then I created a
script which does something similar:

#!/bin/sh
echo -ne  "\033]2;MUTT - $MUTTMAILBOX\007"

However, I couldn't get a folder-hook like the one you suggest to work.
Instead I had to do:

folder-hook . 'push !~/bin/mutt-xterm-title\n'

Is there a better way to do that?  Unfortunately that interferes with
the typing of my imap password.  I don't like storing the password in
the configuration file, but at least it works.

- Peter

-- 
Peter D. Kovacs <[EMAIL PROTECTED]>
Software Developer
Webmachines, Inc. http://webmachines.com
--- mx.c~       Thu Jul 26 10:37:37 2001
+++ mx.c        Thu Jul 26 10:40:19 2001
@@ -727,6 +727,9 @@
   }
 
   unset_option (OPTFORCEREFRESH);
+
+  setenv("MUTTMAILBOX", path, 1 );
+
   return (ctx);
 }
 

PGP signature

Reply via email to