Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ANSI bg colour outside of prompt area
ZyX <kp-pav@xxxxxxxxx> writes:
> 23.02.2015, 19:48, "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>:
>> On Feb 23, 11:58am, Christian Neukirchen wrote:
>> }
>> } In xterm and urxvt, you can do
>> }
>> } printf '\033]10;%d\a\033]11;%d\a' $fgcolor $bgcolor
>>
>> Hmm, that didn't work for me -- it did nothing in xterm, and in urxvt it
>> changed the background but not the foreground.
>>
>> Incidentally $fgcolor and $bgcolor there are numeric codes, not escape
>> sequences. If you do
>>
>> autoload colors
>> colors
>>
>> then you can use e.g. $color[yellow] to get the numeric code.
>
> I do not know why Christian Neukirchen thinks fgcolor and bgcolor are
> supposed to be numeric codes here. You should actually use strings:
> the following works in urxvt, xterm and konsole:
>
> printf '\033]10;%s\a\033]11;%s\a' Blue Red
> printf '\033]10;%s\a\033]11;%s\a' '#00FF00' '#0000FF'
>
> . These are colors recognized by an X11 function, *not* the terminal
> escape sequences or terminal color numbers.
I read urxvt(7) and tested it, and assumed they implement "XTerm
Operating System Commands" like xterm. ;)
But this is even more useful.
--
Christian Neukirchen <chneukirchen@xxxxxxxxx> http://chneukirchen.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author