--- ./curs_main.c Wed Jan 16 12:44:25 2002 +++ ../mutt-1.4.2.1/./curs_main.c Thu Apr 1 19:02:24 2004 @@ -103,6 +103,22 @@ extern const char *ReleaseDate; +static void set_xterm_title_bar(char *title) +{ + fputs("\033]2;", stdout); + fputs(title, stdout); + fputs("\007", stdout); + fflush(stdout); +} + +static void set_xterm_icon_name(char *name) +{ + fputs("\033]1;", stdout); + fputs(name, stdout); + fputs("\007", stdout); + fflush(stdout); +} + void index_make_entry (char *s, size_t l, MUTTMENU *menu, int num) { format_flag flag = M_FORMAT_MAKEPRINT | M_FORMAT_ARROWCURSOR | M_FORMAT_INDEX; @@ -554,6 +570,13 @@ mutt_paddstr (COLS, buf); SETCOLOR (MT_COLOR_NORMAL); menu->redraw &= ~REDRAW_STATUS; + if (option(OPTXTERMSETTITLES)) + { + menu_status_line (buf, sizeof (buf), menu, NONULL (XtermTitle)); + set_xterm_title_bar(buf); + menu_status_line (buf, sizeof (buf), menu, NONULL (XtermIcon)); + set_xterm_icon_name(buf); + } } menu->redraw = 0; --- ./globals.h Thu Jan 3 12:57:19 2002 +++ ../mutt-1.4.2.1/./globals.h Thu Apr 1 16:44:42 2004 @@ -111,6 +111,8 @@ WHERE char *Tochars; WHERE char *Username; WHERE char *Visual; +WHERE char *XtermTitle; +WHERE char *XtermIcon; WHERE char *LastFolder; --- ./init.h Wed Jul 24 01:41:29 2002 +++ ../mutt-1.4.2.1/./init.h Thu Apr 1 19:04:11 2004 @@ -2366,6 +2366,27 @@ ** Controls whether mutt writes out the Bcc header when preparing ** messages to be sent. Exim users may wish to use this. */ + {"xterm_icon", DT_STR, R_BOTH, UL &XtermIcon, UL "M%?n?AIL&ail?"}, + /* + ** .pp + ** Controls the format of the icon title, as long as xterm_set_titles + ** is enabled. This string is identical in formatting to the one used by + ** ``$$status_format''. + */ + {"xterm_set_titles", DT_BOOL, R_BOTH, OPTXTERMSETTITLES, 0}, + /* + ** .pp + ** Controls whether mutt sets the xterm title bar and icon name + ** (as long as you're in an appropriate terminal). The default must + ** be off to force in the validity checking. + */ + {"xterm_title", DT_STR, R_BOTH, UL &XtermTitle, UL "Mutt with %?m?%m messages&no messages?%?n? [%n New]?"}, + /* + ** .pp + ** Controls the format of the title bar of the xterm provided that + ** xterm_set_titles has been set. This string is identical in formatting + ** to the one used by ``$$status_format''. + */ /*--*/ { NULL } }; --- ./mutt.h Wed Jul 24 02:46:58 2002 +++ ../mutt-1.4.2.1/./mutt.h Thu Apr 1 16:46:09 2004 @@ -418,6 +418,7 @@ OPTWRAPSEARCH, OPTWRITEBCC, /* write out a bcc header? */ OPTXMAILER, + OPTXTERMSETTITLES, /* PGP options */ --- ./Muttrc.head Thu Feb 12 00:52:07 2004 +++ ../mutt-1.4.2.1/./Muttrc.head Thu Apr 1 18:47:32 2004 @@ -15,9 +15,9 @@ macro pager \cb |urlview\n 'call urlview to extract URLs out of a message' # Show documentation when pressing F1 -macro generic "!less /usr/local/doc/mutt/manual.txt\n" "Show Mutt documentation" -macro index "!less /usr/local/doc/mutt/manual.txt\n" "Show Mutt documentation" -macro pager "!less /usr/local/doc/mutt/manual.txt\n" "Show Mutt documentation" +macro generic "!less /usr/freeware/doc/mutt/manual.txt\n" "Show Mutt documentation" +macro index "!less /usr/freeware/doc/mutt/manual.txt\n" "Show Mutt documentation" +macro pager "!less /usr/freeware/doc/mutt/manual.txt\n" "Show Mutt documentation" # If Mutt is unable to determine your site's domain name correctly, you can # set the default here. --- ./doc/muttrc.man Wed Feb 11 05:57:35 2004 +++ ../mutt-1.4.2.1/./doc/muttrc.man Thu Apr 1 18:47:37 2004 @@ -972,7 +972,7 @@ .B dotlock_program .nf Type: path -Default: \(lq/usr/local/bin/mutt_dotlock\(rq +Default: \(lq/usr/freeware/bin/mutt_dotlock\(rq .fi .IP Contains the path of the mutt_dotlock (8) binary to be used by @@ -1783,7 +1783,7 @@ .B ispell .nf Type: path -Default: \(lq/usr/bin/ispell\(rq +Default: \(lq/usr/freeware/bin/ispell\(rq .fi .IP How to invoke ispell (GNU's spell-checking software). @@ -3388,7 +3388,7 @@ .B sendmail .nf Type: path -Default: \(lq/usr/sbin/sendmail -oem -oi\(rq +Default: \(lq/usr/lib/sendmail -oem -oi\(rq .fi .IP Specifies the program and arguments used to deliver mail sent by Mutt. @@ -4098,6 +4098,42 @@ .IP Controls whether mutt writes out the Bcc header when preparing messages to be sent. Exim users may wish to use this. + + +.TP +.B xterm_icon +.nf +Type: string +Default: \(lqM%?n?AIL&ail?\(rq +.fi +.IP +Controls the format of the icon title, as long as xterm_set_titles +is enabled. This string is identical in formatting to the one used by +\(lq$status_format\(rq. + + +.TP +.B xterm_set_titles +.nf +Type: boolean +Default: no +.fi +.IP +Controls whether mutt sets the xterm title bar and icon name +(as long as you're in an appropriate terminal). The default must +be off to force in the validity checking. + + +.TP +.B xterm_title +.nf +Type: string +Default: \(lqMutt with %?m?%m messages&no messages?%?n? [%n NEW]?\(rq +.fi +.IP +Controls the format of the title bar of the xterm provided that +xterm_set_titles has been set. This string is identical in formatting +to the one used by \(lq$status_format\(rq. .\" -*-nroff-*- --- ./doc/manual.sgml Thu Feb 12 00:52:09 2004 +++ ../mutt-1.4.2.1/./doc/manual.sgml Thu Apr 1 18:47:37 2004 @@ -3415,7 +3415,7 @@ dotlock_program