From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22562 invoked by alias); 23 Feb 2015 21:27:41 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34627 Received: (qmail 24944 invoked from network); 23 Feb 2015 21:27:38 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, T_FSL_HELO_BARE_IP_2 autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1424726450; bh=a8BictTbwgExQl5uLdykGFvIkCYA62V4PWUx+WBqueU=; h=From:To:In-Reply-To:References:Subject:Date; b=Fye4o2STyWW2p+w43sRTnIBj5PfFB0W72GhnPvH1gUXoWd1Nr0gT5Dz4rSzUkLWPo oCzsnvgzUhe51wBQEb8bAQi4Lfu97gtTno/w7Df0Bb71bheROsXj/U9CfZ9dgEK1CA isWBjfIqPAsvQ4DOXTkLpFmF62GTqgJxCsylorzc= From: ZyX To: Christian Neukirchen , "zsh-workers@zsh.org" In-Reply-To: <877fv8tksx.fsf@gmail.com> References: <20150222132310.GA18377@wintermute> <150222111007.ZM18687@torch.brasslantern.com> <20150222200735.GA14096__25621.2553395473$1424635776$gmane$org@wintermute> <87fv9wuc6z.fsf@gmail.com> <150223084750.ZM20328@torch.brasslantern.com> <6174581424711648@web12m.yandex.ru> <877fv8tksx.fsf@gmail.com> Subject: Re: ANSI bg colour outside of prompt area MIME-Version: 1.0 Message-Id: <5748731424726449@web9o.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 24 Feb 2015 00:20:49 +0300 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=koi8-r 23.02.2015, 23:50, "Christian Neukirchen" : > ZyX writes: >> š23.02.2015, 19:48, "Bart Schaefer" : >>> š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. ;) They do. It is xterm documentation that points out that XParseColor should be used, pointing out explicitly that colors may be specified by name or RGB specification. I have tried replacing Blue and Red with numbers and this is not working in xterm, neither it is in konsole. Rxvt-unicode indeed does something when it receives numbers in place of Blue and Red, but this is the only terminal that does this I have (also not the primary one (used to be once, changed to konsole due to a) 24-bit color support and b) much easier configuration if you need powerline fonts)), and this is going directly against original specification which specifies *only* XParseColor. By the way, other color options supported by XParseColor are as well supported by konsole, xterm and urxvt. I have not tried all variants, but at least CIEXYZ:0.5/0.5/0.5 works. > > But this is even more useful. > > -- > Christian Neukirchen š šhttp://chneukirchen.org