Re: gnome-terminal
- From: Jean Raymond Chauviere <Jean-Raymond Chauviere cetelem fr>
- To: Mikael Hermansson <mikeh bahnhof se>
- CC: gnome-list gnome org
- Subject: Re: gnome-terminal
- Date: Fri, 27 Aug 1999 12:29:52 +0200
With an xterm, it's easy to do :
#D# fichier IGU: titre(1)
#D#
#D#
#D# NAME
#D# titre - modifie le titre d'une fenêtre xterm
#D#
#D# SYNOPSYS
#D# titre libellé....
#D#
#D# LOCALISATION
#D# /app/gnu/share/fksh
#D#
#D# DESCRIPTION
#D# Modifie le titre de la fenêtre en envoyant la séquence de code adéquate.
#D#
#D# PRE-REQUIS
#D# <TT>FPATH=/app/gnu/share/fksh</TT>
#D#
#D# EXEMPLE
#D# titre `hostname` / `logname`
#D#
#D# AUTEUR
#D# J.R Chauvière(chauvier@cetelem.fr), Levallois-Perret(F-(92595)
titre() {
case "$TERM" in
xterm*|vs100*) print -n "" ;;
esac
}
between the "" of the print command you need some special characters, you
can decript with
the following output of the od -co titre command :
0000760 * | v s 1 0 0 * ) p r i n t
025174 073163 030460 030052 024440 070162 064556 072040
0001000 - n " 033 ] 1 ; $ * \a 033 ] 2 ; $
026556 020042 015535 030473 022052 003433 056462 035444
0001020 * \a " ; ; \n \t e s a c \n } \n \n
025007 021040 035473 005011 062563 060543 005175 005012
The last thing you have to do is to encapsulate commands in function:
su(){
case $1 in
-) TITRE="`uname -n` / $2" ;;
*) TITRE="`uname -n` / $1" ;;
esac
titre $TITRE
/usr/bin/su $@
titre `uname -n` / $LOGNAME
}
This one is used by system administrator 'to know where they are'
Be carefull to give the full pathname in the function to avoid call
recursion.
in ksh, you can define:
export FPATH=directory of function'
This works in ksh, I suppose it will work in bash . But it hasn't FPATH, so
you need to
source every file in your .bashrc.
for f in $HOME/functions/*
do
. $f
done
To have the same behaviour with the gnome terminal, it's necessary to know
the
string to send. I suppose the developers can answer....(if it's
implemented.)
JRC
Mikael Hermansson wrote:
> Hello!
>
> I don't know if this is possible but I have a option I want to implement
> in gnome-terminal.
>
> Why not let the window title has the same name as the
> directory/application its points to, for example:
>
> When change directory with cd command it also should change the
> windowtitle and when gnome-terminal start a new program the title changes
> to applications name...
>
> Yes I know there is an option(-t) to set the title but I want the
> terminal to automatic change the title when it's already is running :-)
>
> Is it possible to implement this?
>
> Greats
>
> MikeH
>
>
> ---
>
> Check out my homepage at (under heavy reconstruction):
> http://www.bahnhof.se/~mikeh
>
> Email: mikeh@bahnhof.se
> international Phone 46-44-126995
> Sweden Phone: 044-126995
> ICQ: Error fix later
>
> --
> FAQ: Frequently-Asked Questions at http://www.gnome.org/gnomefaq
> To unsubscribe: mail gnome-list-request@gnome.org with
> "unsubscribe" as the Subject.
--
Nur der kleine Geist hält Ordnung, das Genie beherrscht das Chaos.
Seuls les petits esprits aiment l'ordre, le génie maitrîse le chaos.
(anonyme)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]