Closed FantasyTeddy closed 2 years ago
Configuration loading is getting on my nerves >:(
I'll have a look at what's causing it to break
Sorry, I didn't mean to hit a sore spot :(
That's okay, I hope we can fix these kinds of issues once and for all.
Can you give v6.0.2 a try?
It's supposed to ease how configuration is handled internally to avoid bugs like this one.
Unfortunately, the behavior in v6.0.2 is exactly the same...
After some investigation, it looks like the culprit may be config_dir()
where the HOME environment variable is read. This does not seem to work on Windows and should probably also not be necessary?
Let me know if I can help with any further information.
You're right, extra::config_dir()
does not cover Windows, no idea how that one slipped off the radar while I was refactoring.
You're welcome to fix it if you'd like, otherwise, we'll add it the 6.1.0 milestone and fix it ASAP :)
I have the same issue I am in version 6.0.1
Sorry to hear that @McStecca
v6.1(that is supposed to fix these issues once and for all) is stalling due to some backend work going on in libmacchina. Can you try building from the v6.0.2 branch?
Can you show me your config and the theme that's being used?
(built from v6.0.2 branch) Mmh ok, it works now But there is something wrong, the only theme i can use is the default Helium. The only differences form the one i was using are the custom ascci art (working if i add it on helium) and the colors. If in the colors i make everything "Yellow" it works, but if i make something "Orange" it doesn't recognize it no more.
Can you provide me with the theme file with the changes you want applied (that it isn't recognizing)?
Not recognized:
hide_ascii = false
prefer_small_ascii = false
spacing = 2
padding = 0
separator = "->"
key_color = "Red"
separator_color = "Orange"
[bar]
glyph = "o"
symbol_open = "("
symbol_close = ")"
visible = false
[box]
title = "-< Info >-"
visible = true
[box.inner_margin]
x = 2
y = 1
[custom_ascii]
color = "Cyan"
# Uncomment to use your own ASCII art.
path = "/home/stecca/.config/macchina/themes/arch1"
[randomize]
key_color = false
separator_color = false
[keys]
host = "Host"
kernel = "Kernel"
battery = "Battery"
os = "OS"
de = "DE"
wm = "WM"
distro = "Distro"
terminal = "Terminal"
shell = "Shell"
packages = "Packages"
uptime = "Uptime"
memory = "Memory"
machine = "Machine"
local_ip = "IP"
backlight = "Brightness"
resolution = "Resolution"
cpu_load = "CPU Load"
cpu = "CPU"
Recogized:
hide_ascii = false
prefer_small_ascii = false
spacing = 2
padding = 0
separator = "->"
key_color = "Red"
separator_color = "Yellow"
[bar]
glyph = "o"
symbol_open = "("
symbol_close = ")"
visible = false
[box]
title = "-< Info >-"
visible = true
[box.inner_margin]
x = 2
y = 1
[custom_ascii]
color = "Cyan"
# Uncomment to use your own ASCII art.
path = "/home/stecca/.config/macchina/themes/arch1"
[randomize]
key_color = false
separator_color = false
[keys]
host = "Host"
kernel = "Kernel"
battery = "Battery"
os = "OS"
de = "DE"
wm = "WM"
distro = "Distro"
terminal = "Terminal"
shell = "Shell"
packages = "Packages"
uptime = "Uptime"
memory = "Memory"
machine = "Machine"
local_ip = "IP"
backlight = "Brightness"
resolution = "Resolution"
cpu_load = "CPU Load"
cpu = "CPU"
To be fair in the theme documentation there is no orange but before 6.0.1 it was working anyway
@McStecca Yeah, I can reproduce this.
This is very weird, seems like the color deserialization is having issues with "Yellow" in particular.
@uttarayan21 I think we should have a look at color-to-tui to see what's going wrong.
tui::style::Color
doesn't have an Orange So I didn't deserialize Orange https://github.com/fdehau/tui-rs/blob/master/src/style.rs#L7-L27
To be fair in the theme documentation there is no orange but before 6.0.1 it was working anyway
Hmm I'm not sure how that'd work.
Maybe @grtcdr added a Orange deserialization which resolved to an Rgb(r,g,b) ?
Anyway the good news is now you can use hex colors like #FFA500
tui::style::Color
doesn't have an Orange
Oh, I didn't realize that! And you're right, terminals don't have a dedicated color for Orange. I'll include a list of useable colors in the manpages.
Hey @FantasyTeddy, is this still an issue with the latest v6.0.3?
No, everything works again as expected :)
Describe the bug I updated to Version 6.0.1 today and it appears that my config cannot be found. (Located at: ~\AppData\Roaming\macchina\macchina.toml) Any customization from my config is not loaded and the default theme is displayed. I also do not get an error message that my config is invalid...
System Information