[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde
Subject:    Re: KDE enhanced shell?
From:       Daniel Grana <grana () ie ! iwi ! unibe ! ch>
Date:       1998-02-26 12:18:48
[Download RAW message or body]

On Wed, 25 Feb 1998 weis@stud.uni-frankfurt.de wrote:

> Hi,
> 
> On Mon, 16 Feb 1998, Alfred Perlstein wrote:
> 
> > anyone think about making a KDE enhanced shell, just taking tcsh or bash and
> > have it talk to it's "window" to tell it what directory it is it, and what
> > program it is running....
> > 
> > a little cut and paste and a shell could probably put in the titlebar what
> > program is being run, and what the directory is, then the term could
> > remember that next time it is started up....
> 
> That would be really cool. It wont go in the official bash
> distribution, but its cool!


well the directory (and the hostname) isn't much of a problem (even works with
kvt :) but this is not a KDE problem, so follow-ups not on the list but to me

here are some instructions for the different most used shells. Put that in
the correspnding .zshrc .bashrc or similar. 

Keep in mind that ^[ is really the <esc> character and ^G is the <bel>
character, so copy&pasting out of this mail won't work (e.g. ^G means CONTROl-G) 
...  if anybody has problems, I can mail the part to him/her directly ... 

here it comes then (changes and suggestions are welcome :):

--------------------------------------------------------------------------------

zsh:
chpwd () { print -Pn '^[]0; %m - %~ ^G%' }

--------------------------------------------------------------------------------

tcsh:
alias cwdcmd 'echo -n "^[]2;${HOST} - $cwd ^G"'

--------------------------------------------------------------------------------

bash:  (deluxe version :)

function wintitle()             
{
   echo -n "^[]2;"$HOSTNAME" - $@^G"
}

function icontitle()
{
   echo -n "^[]1;$@^G"
}

function cwdtitles()
{
   wintitle $PWD
   icontitle $ICONTITLE
}

--------------------------------------------------------------------------------


++-+--+----++-+--+-+-+----------+++-+-+-+++-----+-+-+-+------+-+-++-+-+-+-+--+
|  Daniel Grana                                                              |
|  University of Bern                                                        |
+  Engehaldenstr. 8, 3012 Bern, Switzerland                                  +
+  Tel: (031) 631 48 44                                                      +
|  Mail: grana@ie.iwi.unibe.ch                                               |
++---+-+-+---++-+-++++---+-+-++++--+-+-+-++--+++-+-+++-----++-+-++++-+-++-+--+

================================================================================
                   +++ the KDE project mailing lists +++
To unsubscribe from this list send mail to kde-request@kde.org with the 
                         **Subject** unsubscribe. 
================================================================================

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic