Welcome, Guest. Please login or register.

Author Topic: KCON: newshell - possible to change cli background color?  (Read 5698 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16882
  • Country: gb
  • Thanked: 6 times
    • Show all replies
Re: KCON: newshell - possible to change cli background color?
« on: January 17, 2004, 09:18:31 PM »
Personalising normal shell or KingCON?

Like this, you mean?


Not difficult, as long as you know your escape sequences. I have the following in my s:shell-startup

echo "*e[>1m*e[32;41m*e[0;0H*e[J"
prompt "*n*e[>1m*e[33;41m*e[1m%N/%R.*e[30;41m%S>*e[0m*e[32;41m "
alias CLS "echo *"*E[0;0H*E[J*""
echo "AmigaOS $OS. Workbench (Disk) $Workbench, Kickstart (ROM) $Kickstart*n"
date
echo "*nMemory*n"
avail

int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16882
  • Country: gb
  • Thanked: 6 times
    • Show all replies
Re: KCON: newshell - possible to change cli background color?
« Reply #1 on: January 17, 2004, 10:08:43 PM »
No doubt that vinced is the more functional console, but I've been using kingcon so long I forgot what the orginal shell was :-)
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16882
  • Country: gb
  • Thanked: 6 times
    • Show all replies
Re: KCON: newshell - possible to change cli background color?
« Reply #2 on: January 18, 2004, 01:52:52 AM »
@Framiga

Some things you should realise about the normal shell and KingCon both

In the following escape sequences, X is a number from 0-7 that reflect the eight colours set in your palette prefs.

*e[>Xm - sets the console background colour to X

*e[3Xm - sets the text colour to X

*e[4Xm - sets the text background colour to X

You can chain these, which is how you get for example the "*e[32;41m", which sets the text/text background colours at the same time.

So numbers 0-3 in these for a standard WB palette are grey, black, white and light blue repsectively.

In the prompt string, I coloured the "shell number / returncode" part with colour number 3, which is a blue colour on my set up.

Yours is very dark blue presumably because you set colour 3 as dark blue in your palette preferences.

Try a different number for X in

prompt "*n*e[>1m*e[3X;41m*e[1m%N/%R.*e[30;41m%S>*e[0m*e[32;41m "

...or change your palette prefs to make colour 3 the shade of blue you want (or both - find a spare colour in your 8 basic workbench colours, change it to whatever you want, and use that number for X)..

Hope this helps.
int p; // A