Re: terminal-colors.d changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 13, 2014 at 09:16:40PM +0300, Mantas Mikulėnas wrote:
> On 2014-05-13 14:38, Karel Zak wrote:
> >   * "scheme" files to customize colors are supported now, for example
> > 
> >        echo 'alert 37;41' >> /etc/terminal-colors.d/dmesg.scheme
> > 
> >     sets red background color for alert messages.
> >     
> >     The scheme files supports color names (e.g. "red"), ANSI color
> >     sequences (e.g. 37;41) and escape sequences (e.g. \a for bell).
> 
> Does it support multiple escape sequences?
> 
> The 16/256/RGB-color sequence is a bit _odd_ in that it consists of
> three parameters (e.g. \e[38;5;72m for color72) and generally cannot be
> mixed with other sequences. (Some terminals allow this, others forbid,
> particularly mosh [1].)

Yes, for example

   echo 'warn 38;5;72' >> /etc/terminal-colors.d/dmesg.scheme

works. The \e[ m is unnecessary (we follow coreutils dir colors
semantic).

> I guess right now 'alert 38;5;16m\e[48;5;202' would work, but it just
> doesn't feel right.

  alert 38;5;16m\e[48;5;202

works, but in this case more consistent and readable notation is probably

  alert \e[38;5;16m\e[48;5;202m  

that works too. 

(The result is orange background and black foreground, right? :-)

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux