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

From: Timur Fayzrakhmanov <timfayz.only_AT_gmail.com>
Date: Wed, 1 Aug 2018 21:33:50 +0200

> Either copy config.def.h to config.h and edit that, or use <https://st.suckless.org/patches/xresources>.

opal hart, thank you for pointing at least the X-way of doing this.
However, I expected to be able change a color using just escape
sequences. Something like printf "\\e]P%x%s" where %x is color index
and %s is RGB color. As I observed it's kind of "standard" way of
applying color schemes.

> So, in your case you do it via changing config.h and recompiling st.
> This is how I applied a theme myself.

Daniel, I totally understand your point but it seems to me the escape
sequences are kind of "native way" of setup. So I don't know (really,
even if I'm wrong) why it should be hardcoded at config.h.

Ok (if there is no way but use config.h), how to set the rest of six
colors to form 216 RGB color space?
```
static const char *colorname[] = {
/* 8 normal colors */
...
/* 8 bright colors */
...
[255] = 0,

/* Here? */
/* BTW, does 232-255 grayscale colors (from black to white in 24
steps) are formed automatically and not need to be set explicitly? */
```

Regards,
Timur Fayzrakhmanov
Regards,

Timur Fayzrakhmanov
Software engineer at MCST
Kaliningrad, Russia
+79047667076
LinkedIn


On Tue, Jul 31, 2018 at 3:39 PM, Daniel Vartanov <dan_AT_vartanov.net> wrote:
> Hey Timur,
>
> Configuring suckless programs via code and recompiling it IS the right
> way of configuring suckless programs.
> So, in your case you do it via changing config.h and recompiling st.
> This is how I applied a theme myself.
>
> Cheers,
> Daniel Vartanov
>
> On 30 July 2018 at 17:59, opal hart <opal_AT_wowana.me> wrote:
>> Either copy config.def.h to config.h and edit that, or use <https://st.suckless.org/patches/xresources>.
>> --
>> wowaname <https://wowana.me/pgp>
>> Please use detailed subject lines and reply below quoted text
>> whenever possible.
>>
>
Received on Wed Aug 01 2018 - 21:33:50 CEST

This archive was generated by hypermail 2.3.0 : Wed Aug 01 2018 - 21:36:07 CEST