delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/09/04/22:58:30

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <431BB55E.99B6B779@dessent.net>
Date: Sun, 04 Sep 2005 20:02:54 -0700
From: Brian Dessent <brian AT dessent DOT net>
MIME-Version: 1.0
To: Cygwin List <cygwin AT cygwin DOT com>
Subject: Re: rxvt titles and icon names
References: <Pine DOT GSO DOT 4 DOT 60 DOT 0509042140050 DOT 5235 AT taxa DOT epi DOT umn DOT edu>
X-IsSubscribed: yes
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019