Welcome, Guest. Please login or register.

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

Description:

0 Members and 1 Guest are viewing this topic.

Offline virgolaTopic starter

  • Newbie
  • *
  • Join Date: Oct 2003
  • Posts: 19
    • Show only replies by virgola
KCON: newshell - possible to change cli background color?
« on: January 17, 2004, 08:47:31 PM »
Personalizing my cli window...

Do you know if it's possible to configure the normal shell background (not just the text background) via shell-startup? (special characters and so...)

I've already personalized the font color and style but nothing to do with the background.
:-?
It is possible?
If not, which one it's the less dangerous hack to use?

Thanks!
 

Offline Ilwrath

Re: KCON: newshell - possible to change cli background color?
« Reply #1 on: January 17, 2004, 08:56:39 PM »
Nope... I never found a way to do it with escape sequences or anything.  As you mentioned, best I could do was change the TEXT background, which wasn't a huge help, as I wanted my background to be black, instead of grey, as my OS background color was.

I ended up using ViNCEd, which is available from aminet, or included in OS 3.9.

 

Offline Merc

  • Sr. Member
  • ****
  • Join Date: Apr 2002
  • Posts: 312
    • Show only replies by Merc
    • http://chebucto.ns.ca/~ah210/Profile.html
Re: KCON: newshell - possible to change cli background color?
« Reply #2 on: January 17, 2004, 09:02:05 PM »
There are 2 ways I know of.  One is through escape sequences.  My memory might be a bit foggy, but I think you have to send:

[4xm

where x is the colour number to use.  I think you can only use up to 7 though.  You can set the foreground colour by changing the 4 above to a 3.  

The other way is with a program called shellcolor which works a bit better than this.  I think it's on Aminet.
 

Offline virgolaTopic starter

  • Newbie
  • *
  • Join Date: Oct 2003
  • Posts: 19
    • Show only replies by virgola
Re: KCON: newshell - possible to change cli background color?
« Reply #3 on: January 17, 2004, 09:14:04 PM »
Nice try Merc ;-), but nothing to do...

[4xm  (tried in many different ways) doesn't work

and nothing on aminet that sounds like you said...
 

Offline Merc

  • Sr. Member
  • ****
  • Join Date: Apr 2002
  • Posts: 312
    • Show only replies by Merc
    • http://chebucto.ns.ca/~ah210/Profile.html
Re: KCON: newshell - possible to change cli background color?
« Reply #4 on: January 17, 2004, 09:15:37 PM »
Really?!  Sheesh now I'm going to have to pop into UAE and try it, hang on...

Ok, it worked!  Just open a shell window and press
ESC, then [42m and press enter.  It'll say unknown command, but it does change the colour, sort of..  but it only changes the background of the text, not the whole window.

I think I have shellcolor on a CD here somewhere, I'll see if I can find it.
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16882
  • Country: gb
  • Thanked: 6 times
    • Show only replies by Karlos
Re: KCON: newshell - possible to change cli background color?
« Reply #5 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 Merc

  • Sr. Member
  • ****
  • Join Date: Apr 2002
  • Posts: 312
    • Show only replies by Merc
    • http://chebucto.ns.ca/~ah210/Profile.html
Re: KCON: newshell - possible to change cli background color?
« Reply #6 on: January 17, 2004, 09:20:21 PM »
@Karlos:

Wow, nicely done!  :-D
 

Offline Gerbinist

Re: KCON: newshell - possible to change cli background color?
« Reply #7 on: January 17, 2004, 09:21:06 PM »
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
 

Offline Gerbinist

Re: KCON: newshell - possible to change cli background color?
« Reply #8 on: January 17, 2004, 09:24:49 PM »
Aminet 4in1...

4in1 is a little program for changing colors and style of characters
in a shell window; it also displays time and date.
Now you can forget boring escape sequences.
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
 

Offline Kent

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 680
    • Show only replies by Kent
    • http://amiga.org/modules/mylinks/visit.php?lid=87
Re: KCON: newshell - possible to change cli background color?
« Reply #9 on: January 17, 2004, 10:05:51 PM »
What I did was ditch KCON for ViNCed and turned on the "swap ansi colors" option to get a black background.  After that I read the complete document to ViNCed and set it up to work identical to how KCON works.  There are quiet a few extra features of ViNCed that really help getting around in shelldom.  Also, since I do some telnet programming, I use ViNCed to display the standard ASNI color table.  That's not something you can do with KCON without locking the palette down to some really funky settings.

:pint:
I love the modern age world of this middle age crises America... all these SUVs driving around like there\\\'s gas to spare and then some.

http://www.RequestFocus.com

W. Kent Seaton ~ RequestFocus.com
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16882
  • Country: gb
  • Thanked: 6 times
    • Show only replies by Karlos
Re: KCON: newshell - possible to change cli background color?
« Reply #10 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 Gerbinist

Re: KCON: newshell - possible to change cli background color?
« Reply #11 on: January 17, 2004, 10:22:59 PM »
Forget about that 4in1... it suxx ;-)
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
 

Offline Framiga

  • Hero Member
  • *****
  • Join Date: May 2003
  • Posts: 4096
    • Show only replies by Framiga
Re: KCON: newshell - possible to change cli background color?
« Reply #12 on: January 17, 2004, 11:47:52 PM »
Hi Karlos,

i've tryed your

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

but i have a very dark blue at Prompt "14/8".

How can i get a pure blue 0-0-255?

My WB is at 16bit P96.

Cheers

 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16882
  • Country: gb
  • Thanked: 6 times
    • Show only replies by Karlos
Re: KCON: newshell - possible to change cli background color?
« Reply #13 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
 

Offline Framiga

  • Hero Member
  • *****
  • Join Date: May 2003
  • Posts: 4096
    • Show only replies by Framiga
Re: KCON: newshell - possible to change cli background color?
« Reply #14 on: January 18, 2004, 01:42:06 PM »
Hi Karlos,

thank you very much, Karlos :-) i went go crazy . . . a very useful hints for me and, i think for all too :-)

Thanks again

Ciao

Interview to Bjorn Lynne (Bitplane n.3 april/may 2002)