aristocratos / btop

A monitor of resources
Apache License 2.0
21.36k stars 655 forks source link

[BUG] Themes use commented-out directives #849

Closed acidghost closed 6 months ago

acidghost commented 6 months ago

The parser for themes does not handle comments properly. It parses commented-out directives as if they were not commented out.

To Reproduce

Using something like the following will set the color to #7323c3, even if the line starts with a '#'.

theme[cpu_start]="#af5fff"
# theme[cpu_start]="#7323c3"

Expected behavior

The color should have been #af5fff.

Cause

This block does not handle comments at all https://github.com/aristocratos/btop/blob/dd4ada7023223c610ccfad48ec3abe0500f91af5/src/btop_theme.cpp#L383-L401