Order of the Butterfly
Posts: 419 from 2003/8/18
Quote:
I was wondering how to change the colors on Ambient's shell. I don't want to change them globally for all the apps...
You cannot change colors for a certain app only.
As far as I know (someone: correct me if I'm wrong), you define your colors (from 0 to 7) in the file s:con.init - Programs can then set background and foreground colors to one of these colors (using ANSI escapes sequences).
The problem is that very little (if none at all) Amiga/MorphOS shell commands make use of these colors.
To change a color, either add the following line in s:con.init or use echo "line":
[[0;255;120;30V
0 = Color number
255 = Red component
120 = Green component
30 = Blue coponent
V close 'tag'
To change display color, you would then use:
[[32m
where:
3 = type of display
2 = foreground color
m closes 'tag'
=> background will be color 0 and foreground color will be set to color '2' in this example
To reset the display to default style/color, you can use:
[[0m
There are other types of display where background color can be different than color 0, type can be bold, italic,...
=> These are standard ANSI escape chars
Note: the first character '[[' is not simply two '[' it's an 'escape character', see the following file for example:
http://nogfx.free.fr/morphos/con.init
Quote:
There is no shell manual?
There's no manual. I already asked for more information about it but, guess what (:)), I received no answer.
Anyway, hope this will help...
If you need more information, just ask.
Regards,
Leo.
PS: if you need some documentation of standard morphos commands, you may want to try the small "Help" program I'm writting. It only shows a small description of commands for now but can still be usefull: http://nogfx.free.fr/morphos/Help-Projectv01.lha
[ Edited by Leo on 2004/10/10 9:34 ]
Nothing hurts a project more than developers not taking the time to let their community know what is going on.