Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Sun, 21 Mar 2004 14:09:32 -0600
From: Gregory Borota <not-valid@cygwin.com>
Reply-To: cygwin@cygwin.com
To: Vidar <v_fauske@hotmail.com>
Cc: cygwin@cygwin.com
Subject: Re: Window title by shortcut
In-Reply-To: <DAV36l6MMDBfTPQWKtU00003c42@hotmail.com>
Message-ID: <Pine.CYG.4.58.0403211402100.860@lap>
References: <DAV36l6MMDBfTPQWKtU00003c42@hotmail.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Something like this should do it:

1. add in cygwin.bat (or a copy of it),  before bash command:
set __TYTLE__=%~1

2. in your .bash_profile add:
if [ "$__TYTLE__" ]; then
  PS1="\[\033]0;\$__TYTLE__\007"'
\033[32m\]\u@\h \[\033[33m\w\033[0m\]
$ '
fi

3. Create o shortcut with something like this in the target box:
C:\cygwin\cygwin.bat  "Your Title"


If I understood you right, this should solve you problem.
Greg

On Sun, 21 Mar 2004, Vidar wrote:

> Hi!
>
> I'm trying to find a method for making it so that if I launch a specific shortcut to cygwin
> it will have a title of my choosing, and keep it (not change to the current path and such).
> I've searched the archive but all I could find were some procedures including lots of escape
> characters, which I think would make it diffcult to set the title for this shortcut only (I
> also don't know how to input the escape chars =/ --> newbie here).
>
>     - Vidar
>
> --
> 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/
>
>

--
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/

