Re: [dev] [st] Hardcoded colors. Can I change them runtime?

From: Daniel Vartanov <dan_AT_vartanov.net>
Date: Sun, 5 Aug 2018 20:41:56 +0100

Hey,

I appreciate your emotional rollercoaster because of this peculiarity,
the patches indeed are not alwasy compatible (so are any mods to
software TBH).
Have you tried to copy exact numbers from other sources like
https://github.com/honza/base16-st/tree/master/build ?

Cheers,
Daniel

On 5 August 2018 at 17:44, Timur Fayzrakhmanov <timfayz.only_AT_gmail.com> wrote:
>> Just in case it is still relevant I cite a part of dwm description
>> from suckless.org where it explains why editing the source code and
>> recompilation is the best way of configuring such type of software
>
> Daniel, thanks. Yep, I've read the excerpt. I agree about the security
> but the configuring experience is quite overwhelming. It's ok when you
> apply 1-2 patches. The first time I faced with such a approach I were
> truly excited (it was like a WOW effect)! But when I applied 5 patches
> (in case of dwm) - I stuck with a situation when some of them can not
> be applied since the lines they relay on were shifted. Finally, I end
> up manually finding and fixing the lines spending hours (I'm not C nor
> Shell expert). So this way certainly has its own drawbacks.
>
> Back to st and colors..
>
> What I'm trying to achieve is simply the following:
> https://github.com/chriskempson/base16-shell/blob/master/base16-shell.png
> What I've got is *simply* the following: https://ibb.co/cXTjve . As
> you can see, the last 16-21 colors are incorrect.
> What I'm trying to do now is to reach these colors. So, can any body
> hint me how to set color16-21 from within config.def.h?
>
> For convenience, excerpt from config.def.h:
> ```
> static const char *colorname[] = {
> /* 8 normal colors */
> "black",
> ...
> "gray90",
>
> /* 8 bright colors */
> "gray50",
> ...
> "white",
>
> [255] = 0,
>
> /* more colors can be added after 255 to use with DefaultXX */
> ...
> };
> ```
>
> Just in case, base16 works as follows:
> ```
> put_template() { printf '\033]4;%d;rgb:%s\033\\' $_AT_; }
>
> # 16 color space
> put_template 0 $color00
> ...
> put_template 15 $color15
>
> # 256 color space
> put_template 16 $color16
> put_template 17 $color17
> put_template 18 $color18
> put_template 19 $color19
> put_template 20 $color20
> put_template 21 $color21
> ```
>
> Regards,
> Timur F.
>
Received on Sun Aug 05 2018 - 21:41:56 CEST

This archive was generated by hypermail 2.3.0 : Sun Aug 05 2018 - 21:48:06 CEST