Re: Gnome-Terminal : smallf feature request
- From: Joakim Ziegler <joakim styx net>
- To: gnome-list gnome org
- Cc: Tim Hockin <thockin isunix it ilstu edu>
- Subject: Re: Gnome-Terminal : smallf feature request
- Date: Fri, 16 Jul 1999 02:17:22 -0500
On Fri, Jul 16, 1999 at 01:19:49AM -0500, Tim Hockin wrote:
> Lastly, if I could tell the title bar to be `pwd` or '$_' or something.
> basically, a title that reflected the current path and/or file open:
> e.g. "/usr/src/linux: vi kernel/sched.c" would be infinately more helpful
> than "Terminal"
> I'd hack it in myself, but I don't know GTK well enough, or really have the
> time to learn right now. Maybe I will, but if someone beats me there,
> great! The first two should be easy - the third a bit less so.
You can do this with an ANSI escape sequence on most terminals (including
xterm, rxvt, screen, and miscellaneous Windows terminals). Try something like:
if [ id -gn = root ]
then
case "$TERM" in
*linux*)
declare
PS1="\[\033[1;31m\][\[\033[0;37m\]\u@\h:\w\[\033[1;31m\]]\[\03
3[0;37m\] "
;;
*)
declare
PS1="\[\033[1;31m\][\[\033[0;37m\]\w\[\033[1;31m\]]\[\033[0;37
m\033]0;\u@\h: \w\007\] "
;;
esac
else
case "$TERM" in
*linux*)
declare
PS1="\[\033[1;32m\][\[\033[0;37m\]\u@\h:\w\[\033[1;32m\]]\[\03
3[0;37m\] "
;;
*)
declare
PS1="\[\033[1;32m\][\[\033[0;37m\]\w\[\033[1;32m\]]\[\033[0;37
m\033]0;\u@\h: \w\007\] "
;;
esac
fi
(The long lines should be rejoined, I'm sure you'll manage.)
In your /etc/profile to get color-coded prompts which put useful information
in the terminal titlebars. I've never understood why distributions don't do
this kind of thing by default.
--
Joakim Ziegler - styx art director - joakim@styx.net
FIX sysop - FIXmud admin - FIDEL developer - Freehive admin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]