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: Window title by shortcut


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/


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