This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rxvt titles and icon names


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]