Author Topic: Shell and prompt colors  (Read 476 times)

Yanosh

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
Shell and prompt colors
« on: February 11, 2019, 10:47:13 PM »
Icaros 2.2.6 has something wrong with the shell. I've been using black as a background color for a long time and the prompt is the same pink used by MagicWB. To achieve this effect I use this command

Prompt "*E[42m*E[31m%N.*E[43m*E[32m%s*E[42m*E[31m>*E[40m*E[31m "

in the shell-startup and to get the pink prompt I use the command

c:setpencolor SCREEN="Workbench" PEN=7 COLOR=$0097A9FF >NIL:

as the last command of the icaros-sequence.

On Icaros 2.2.5 everything works perfectly, but on 2.2.6 the shell is gray with white prompt on a blue background and black text. I checked with Snoopy and the command is regularly executed. Is this a regression of the shell?

magorium

  • Member
  • ***
  • Posts: 108
  • Karma: +0/-0
  • Convicted non contributor
Re: Shell and prompt colors
« Reply #1 on: February 12, 2019, 03:03:27 AM »
Hi Yanosh,

I am currently not in a position to test with your exact setup (so it might be related to regression, for that paolone might perhaps be able to answer).

Be advised that any other program is able to set the workbench basic colors, and as such might be able to override the settings you made yourself with setpencolor. Afaik only the first 4 workbench colours are set (similar colours as on the standard default workbench), the others you have to set manually using setpencolor.

If you can then please check if there isn't any other program / command issued that changes the workbench colours (after you issued your setpencolor command(s).

There are two programs that alows you to verify the colours of the workbench but i don't know their names from memory. They are both workbench programs that show the current (workbench) (pen)colors. They are test programs though, so not very likely to be installed on a basic setup (development and/or debug directory seems more in line *)

* i can get back to you for the names abnd locations of those program if you like. In which case please give me a day or two to look them up


paolone

  • Moderator
  • Senior Member
  • *****
  • Posts: 276
  • Karma: +3/-0
Re: Shell and prompt colors
« Reply #2 on: February 12, 2019, 03:25:56 PM »
Hi, nothing changes in shell settings from 2.2.5 to 2.2.6. Probably the issue is hidden somewhere in AROS' system files. I can't wonder what one, though.

Yanosh

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
Re: Shell and prompt colors
« Reply #3 on: February 12, 2019, 09:40:27 PM »
Just tried to boot without startup-sequence with boot Icaros 2.2.6 and 2.2.5 and then opened a newshell. With version 2.2.6 the shell was the standard gray, while with 2.2.5 the shell is black. Tried also to use the kernel and bootstrap of 2.2.5 without any luck.

@paolone
Do you remember which system files have been updated from 2.2.5 to 2.2.6?

@magorium
Without startup-sequence there should not be any running programs that can change the colors of the shell. Checking the workbench colors would be really usefull.


Just wondering... would it be possible to modify the shell so that you can directly choose the colors of the background, text and prompt? Increasing the text buffer would be usefull too.

Argh... that grey shell is really awfull.
« Last Edit: February 12, 2019, 09:58:44 PM by Yanosh »

magorium

  • Member
  • ***
  • Posts: 108
  • Karma: +0/-0
  • Convicted non contributor
Re: Shell and prompt colors
« Reply #4 on: February 15, 2019, 06:49:14 AM »
Hi Yanosh,

Sorry for the delay

Without startup-sequence there should not be any running programs that can change the colors of the shell.

That statement is correct.

In case you did test it that way then i'm a bit puzzled with regards to your results. See also below.


Quote
Checking the workbench colors would be really usefull.
Yups.

Two programs are available:
1) palettedemo
2) rtpalette

Both resides in the demo directory of plain AROS.

Quote
Just wondering... would it be possible to modify the shell so that you can directly choose the colors of the background, text and prompt? Increasing the text buffer would be usefull too.
I am not sure what you meant by the word 'choosing'.

The easiest way to 'customize' your shell is by modifying the shell-startup script as that is executed by every shell that is invoked.

The reason any settings with regards to shell colours has no meaning whatsoever is because the way the Amiga (pen) coloring system works. The shell as currently implemented (being compatible with the original workbench shell) dictates the shell to use the default workbench colours.

As stated before the workbench colours can be changed by any program at any time, so any 'setting' can also be lost at any time. It is just how things are implemented.

Having said that, there is no reason why anyone could implement a custom shell that does not comply to the workbench classic standards and draw things in a customized way. The downside of that will be that such a shell would be incompatible with any software that relies on classic behaviour with regards to colours.

On another note, i am not sure but it could be that if you use Magellan as desktop that it is overriding your settings as Magellan seems to use 8 colours. I'm just not sure whether those 8 colours are from default workbench pens or use Zune pens.

PS: As a general note (not meant to be personal for Yanosh) this will be my last post with regards to generic help regarding AROS/Icaros as i'm not about to repeat myself over and over and admin deciding to remove access the old forums over and over again. with me requesting to put them back up. That was not part of the deal we've made. I'll only support Free Pascal from now on.