Re: [gentoo-user] terminal colors

2003-09-12 Thread Marshal Newrock
On Fri, 12 Sep 2003, momesana wrote:

 Does anybody know how to set colors on the terminals?
 I don't mean the colors associated with the ls command which can be realized
 by the entry alias=ls --color in ./bashrc or ./profile but rather a way to
 controll how output to the console looks like. I need this because I want to
 make shellscripts that output something on screen look better (just like
 emerge :-) ).
 I have tried:
 setterm -foreground ... -background ...
 but it wouldn't work.
 The only thing that works is setterm -bold under X and setterm -reversescreen
 under the ordinary shells (without X).

What you want is ANSI escape sequences.  The best source for that I've
seen is the bash prompt howto:
http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x343.html

If you have a mail reader capable of interpreting ANSI codes, I wouldn't
be able to show you here, but I can tell you the following:
You must use 'echo -e' or echo won't interpret it.
The code just needs to start with \0... (the \[ before that in the
examples is just for putting a [ at the beginning of the prompt).

Happy coloring.  :)

-- 
Marshal Newrock, unemployed Linux user in Lansing, MI
Caution: Product will be hot after heating


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] terminal colors

2003-09-12 Thread momesana
It works and it is great ! :-)
That is exactly what I was looking for.
Thanx you for your assistance

Am Freitag, 12. September 2003 18:32 schrieb Marshal Newrock:
 On Fri, 12 Sep 2003, momesana wrote:
  Does anybody know how to set colors on the terminals?
  I don't mean the colors associated with the ls command which can be
  realized by the entry alias=ls --color in ./bashrc or ./profile but
  rather a way to controll how output to the console looks like. I need
  this because I want to make shellscripts that output something on screen
  look better (just like emerge :-) ).
  I have tried:
  setterm -foreground ... -background ...
  but it wouldn't work.
  The only thing that works is setterm -bold under X and setterm
  -reversescreen under the ordinary shells (without X).

 What you want is ANSI escape sequences.  The best source for that I've
 seen is the bash prompt howto:
 http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x343.html

 If you have a mail reader capable of interpreting ANSI codes, I wouldn't
 be able to show you here, but I can tell you the following:
 You must use 'echo -e' or echo won't interpret it.
 The code just needs to start with \0... (the \[ before that in the
 examples is just for putting a [ at the beginning of the prompt).

 Happy coloring.  :)


--
[EMAIL PROTECTED] mailing list



[gentoo-user] terminal colors

2003-09-11 Thread momesana
Does anybody know how to set colors on the terminals?
I don't mean the colors associated with the ls command which can be realized 
by the entry alias=ls --color in ./bashrc or ./profile but rather a way to 
controll how output to the console looks like. I need this because I want to 
make shellscripts that output something on screen look better (just like 
emerge :-) ).
I have tried:
setterm -foreground ... -background ... 
but it wouldn't work.
The only thing that works is setterm -bold under X and setterm -reversescreen 
under the ordinary shells (without X).

I have read through a bunch of mailing lists in order to find the reason for 
this and somebody had noted that it was because of some escape sequences that 
are automatically added because of my configuration.
I have pasted the message from that mailinglist beneath.

any suggestions? 
email me at [EMAIL PROTECTED]

Thanx in advance.
momesana.

  setterm -inversescreen on

worked on my potato, but

setterm -background black -foreground green
setterm -background green -foreground black

seemed to do nothing... then i realized i have some escape
sequences built in to my command prompt -- plus, whenever i do a
ls --color the escape sequences always reset it to white.

just thought i send out a flare to give the folks new to
setterm a heads-up on various caveats... terminal settings can
be transient and changed easily through escape sequences
(editors, listings, etc)...


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] terminal colors

2003-09-11 Thread Alberto Bert
I use xterm and what I do is to set parameters in my ~/.Xdefaults

My setting is:

# Font
XTerm*faceName:
XTerm*faceSize: 10

# Colors
XTerm*background: gray75
XTerm*foreground: gray10
XTerm*cursorColor: goldenrod1

# Cursor Blinking
XTerm*cursorBlink: true
XTerm*cursorOnTime: 500
XTerm*cursorOffTime: 500

# Mouse selection
XTerm*cutNewline:false
XTerm*highlightSelection: true
XTerm*charClass:
33:48,35:48,37:48,43:48,45-47:48,64:48,95:48,126:48,35:48,58:48

but you can find a lot of other versions in the internet.
You can set any color you want (not just foregrond and background.)

alb

On Sep 12 at 12:19AM+, momesana wrote:
 Does anybody know how to set colors on the terminals?
 I don't mean the colors associated with the ls command which can be realized 
 by the entry alias=ls --color in ./bashrc or ./profile but rather a way to 
 controll how output to the console looks like. I need this because I want to 
 make shellscripts that output something on screen look better (just like 
 emerge :-) ).
 I have tried:
 setterm -foreground ... -background ... 
 but it wouldn't work.
 The only thing that works is setterm -bold under X and setterm -reversescreen 
 under the ordinary shells (without X).
 
 I have read through a bunch of mailing lists in order to find the reason for 
 this and somebody had noted that it was because of some escape sequences that 
 are automatically added because of my configuration.
 I have pasted the message from that mailinglist beneath.
 
 any suggestions? 
 email me at [EMAIL PROTECTED]
 
 Thanx in advance.
 momesana.
 
   setterm -inversescreen on
 
 worked on my potato, but
 
 setterm -background black -foreground green
 setterm -background green -foreground black
 
 seemed to do nothing... then i realized i have some escape
 sequences built in to my command prompt -- plus, whenever i do a
 ls --color the escape sequences always reset it to white.
 
 just thought i send out a flare to give the folks new to
 setterm a heads-up on various caveats... terminal settings can
 be transient and changed easily through escape sequences
 (editors, listings, etc)...
 
 
 --
 [EMAIL PROTECTED] mailing list

--
[EMAIL PROTECTED] mailing list