Welcome, Guest. Please login or register.

Author Topic: Define font and background colour in CLI console?  (Read 957 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Ral-ClanTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2006
  • Posts: 1974
  • Country: ca
    • Show only replies by Ral-Clan
    • http://www3.sympatico.ca/clarke-santin/
Define font and background colour in CLI console?
« 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,
Music I've made using Amigas and other retro-instruments: http://theovoids.bandcamp.com
 

Offline SamuraiCrow

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2280
  • Country: us
  • Gender: Male
    • Show only replies by SamuraiCrow
Re: Define font and background colour in CLI console?
« Reply #1 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.
 

Offline Gerbinist

Re: Define font and background colour in CLI console?
« Reply #2 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
Current: OS 3.1.4, Blizzard 1260/50, 64 MB, AGA, CF, Ryś MKII, PCMCIA/CNET
Storage: Elbox E/BOX 1200, SCSI Kit IV, Mediator SX, Voodoo3/4/5, RTL8139 Ethernet, Spider USB 2.0, PixelView PlayTV MPEG2, Terratec 512i, MAS MP3 Player