Amiga.org

Amiga computer related discussion => General chat about Amiga topics => Topic started by: Ral-Clan on April 26, 2020, 03:35:03 PM

Title: Define font and background colour in CLI console?
Post by: Ral-Clan on April 26, 2020, 03:35:03 PM
Hi! 

Is there an Amiga CLI/shell console that can allow me to define the colours and font used?  I'd like a black background with amber or green text, and preferably be able to increase the font size a little too, if possible.

There is an old post on this forum that suggests it is possible in VincED (included in AmigaOS3.9, which I am using), but I have not been able to find that exact setting (although there are others with similar names that do not seem to do much when I enable them).

Thanks,
Title: Re: Define font and background colour in CLI console?
Post by: SamuraiCrow on April 26, 2020, 03:47:50 PM
The setfont command sets the font but the colors are based on pen colors using ANSI escape codes.
Title: Re: Define font and background colour in CLI console?
Post by: Gerbinist on April 26, 2020, 04:08:22 PM
On your sytem drive, you will find a file called S:Shell-Startup. One of the entries is:

Code: [Select]
Prompt "%N.%S> "
For a black shell, you could change this to:

Code: [Select]
Prompt "*e[>1m*e[33;41m%N.*e[30m%S>*e[32;41m "
Now save this change to S:Shell-Startup.Black or any other name you might fancy. Your Shell icon in SYS:System has a tooltype called FROM. Default this is:

Code: [Select]
FROM=S:Shell-Startup
If you want to always use a black shell, change this to:

Code: [Select]
FROM=S:Shell-Startup.Black
(or clone the current icon and thus create one that mentions Black Shell or whatever)


See below for a bit more information about all the codes that are being used in above example:

Code: [Select]
Esc[0m = Resets graphics modes to defaults
Esc[1m = Use Bold

Esc[30m = Use Text color0 = Grey
Esc[31m = Use Text color1 = Black
Esc[32m = Use Text color2 = White
Esc[33m = Use Text color3 = Blue

Esc[40m = Use Text Background color0 = Grey
Esc[41m = Use Text Background color1 = Black
Esc[42m = Use Text Background color2 = White
Esc[43m = Use Text Background color3 = Blue

Esc[>1m = Use Console Background color1 = Black

*e     = Esc

Prompt "*e[>1m*e[33;41m%N.*e[30m%S>*e[32m "
        ======
        Sets the console background colour to Black

Prompt "*e[>1m*e[33;41m%N.*e[30m%S>*e[32m "
              ============
              Sets text colour to Blue, text background to Black and displays shell number (%N)

Prompt "*e[>1m*e[33;41m%N.*e[30m%S>*e[32m "
                          =========
                          Sets text colour to Grey and displays Source (%S)

Prompt "*e[>1m*e[33;41m%N.*e[30m%S>*e[32m "
                                   =======
                                   Sets text colour to White and adds a space