On Wed Jun 28 2000 at 10:50, Dan Herrick wrote:

> This is good, Tony. Thank-you.

No problem.  (I have a bunch of little tweaks tha I use to make life
nicer with linux, this is one of them - although what I'm actually
using is slightly different to what I posted - I also have the last
command exit status being displayed, very handy.  I edited that part
out, since it can be sometimes cause some minor problems).

BTW, there exists an "official" bash-prompt HOWTO which gives lots
of hints and pointers to other resources and fun things.

Similar things can be done with tcsh's prompt too (been there, done
that too.  Although I'll _never_ use tcsh seriously ever again as
bash is FAR superior shell - both interactive and especially for
shell scripting.  But I digress).

> Now, how do I change the size of the titlebar and the size
> of the font in the titlebar so it is big enough to see?

That's a Xresource property that you'll have to tweak.  Not sure
which one.

> And where in the standard documentation stuff is the list
> of ANSI escape sequences so I can tune your colors for
> better readability by my aging eyes on these monitors?

man 5 console_codes

> (I have my xterms .Xdefault-ed for "black" on "white" but
> the black is a washed out looking gray compared to what
> you gave me.)

(Turn off bright by removing `1' from the ansi sequences).

> > > Is there any way that I can display the current time in an xterm title
> > > bar?

This one by Stephan Kuhagen looks interesting.  Not tested, but it
might be possible to do lots of variations on this...

( while true; do
    echo -ne \\033]2\;"`date`"\\007\\033]1\;\\007; sleep 1;
done )&

> > Easy, almost trivial.  You can do that and MUCH more besides.
> >
> > case "$TERM" in
> >   *xterm* )
> >       PS1='\[\033]0;'
> >       PS1="$PS1"'\u@\h-\w-${COLUMNS}x${LINES}-'
> >       PS1="$PS1"'\t'
> >       PS1="$PS1"'\007\]'
> >     ;;
> >   *) PS1='' ;;
> > esac
> > PS1="$PS1"'\[\033[1;32;44;37m\]['
> > PS1="$PS1"'\[\033[33m\]\u'
> > PS1="$PS1"'\[\033[37m\]@'
> > PS1="$PS1"'\[\033[33m\]\h'
> > PS1="$PS1"'\[\033[37m\]:'
> > PS1="$PS1"'\[\033[33m\]\W'
> > PS1="$PS1"'\[\033[37m\]]'
> > PS1="$PS1"'\[\033[37m\]$'
> > PS1="$PS1"'\[\033[0;1;33m\] '
> > export PS1

The secondary prompts, PS2 and PS3, can also be similarly tweaked -
although it isn't really wise to do very much with them).

> > You might not like colours, but I do :)  Very handy if you have
> > terms open to lots of different computers.
> >
> > Tweak that to your heart's content.  Beware of how this works...  it
> > is well documented in the bash(1) man page, but there is a real
> > trick to getting the extra colour codes in there properly "escaped"
> > (with \[ and \]) so that it doesn't give any hassles with long
> > command lines.

Cheers
Tony

Reply via email to