This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: rxvt titles and icon names
- From: Brian Dessent <brian at dessent dot net>
- To: Cygwin List <cygwin at cygwin dot com>
- Date: Sun, 04 Sep 2005 20:02:54 -0700
- Subject: Re: rxvt titles and icon names
- References: <Pine.GSO.4.60.0509042140050.5235@taxa.epi.umn.edu>
- Reply-to: cygwin at cygwin dot com
Mike Miller wrote:
> I am running a new Cygwin on Win XP Pro x64. It seems to be working fine
> but I am unable to get a title and icon name for rxvt most of the time.
> The -n and -T arguments seem to be ignored and I always have "~" (just a
> tilde) in the title bar.
The default bash prompt ($PS1) includes control characters that set the
window title to the current working directory on each printing of the
prompt. "~" just happens to be the directory that you start in, but it
should update as you move to different directories. You will have to
modify your prompt if you want different behavior.
PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ '
The '\w' is replaced by the current working directory (see "man bash")
and the '\e[0;' and '\a' sequences are the beginning and end of the "set
window title to this" escape sequences, respectively. The '\[' and '\]'
bracket the escape sequence to tell bash that it is a nonprinting set of
characters so that it doesn't get confused about the cursor position.
Brian
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/