[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mutt-users
Subject:    Re: Set terminal title when running mutt?
From:       Amit Ramon <amit.ramon () gmail ! com>
Date:       2009-10-22 17:05:14
Message-ID: 4AE090CA.1050805 () gmail ! com
[Download RAW message or body]


chombee wrote:

> Does anyone know how I can set my terminal's window title to something 
> like 'mutt /path/to/mailbox' when running mutt?

For xterm you can set the xterm_status variable, but it might not work 
with other terminals. There is a hack, however, by setting the 
status_format variable to a script that sets the title. For example, I'm 
using a little script that I called 'mutt_status':

#!/bin/sh
# Demonstration of format string pipes. Sets the xterm title to the 2nd 
argument,
# and returns the first  unchanged.
#
# this sets the title
printf "\033]0;$2\007" > /dev/tty
echo "$1"
# end of script

Then I define:

set status_format="mutt_status \"$my_status\" \"$my_title\"|"

where the variables my_status and my_title are set to a format string, 
see the documentation of status_format. I'm using this with mlterm, and 
it also works with xterm.


--- Amit

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic