Icon separate color from file name #1678
Replies: 3 comments 1 reply
-
|
I tried and it seems like the icon field in extensions icon doesn't overwrite the styling. I reset It appears to be Yellow instead. I suspect that is the default color of the file type since it appears in similar styling. Next, I tried to overwrite it using And the icon indeed appears Blue. That means the problem is color in icon does not overwritten anything even though the theme.yml manual shows an example of such. |
Beta Was this translation helpful? Give feedback.
-
|
I patched eza to dump UIStyles for everything run and here is what I get Notice how the style field of icon is None, meaning it actually does overwrite (looking at the source code, options/config.rs), except that it doesn't even care about the style of icons |
Beta Was this translation helpful? Give feedback.
-
|
I looked at the code and has it working now! The code really has no problem but the manual was poorly written. Take a look at the struct definitions: #[derive(Debug, Default, PartialEq, Eq, Clone, Copy, Serialize, Deserialize)]
pub struct IconStyle {
pub glyph: Option<char>,
pub style: Option<Style>,
}
#[derive(Debug, Default, PartialEq, Eq, Clone, Copy, Serialize, Deserialize)]
pub struct FileNameStyle {
pub icon: Option<IconStyle>,
pub filename: Option<Style>,
}Notice how c:
icon:
glyph: C
style:
foreground: RedHope this helps. I really took my time to inspect and report when I found something new so I end up with 3 comments lol. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to specify the color of an icon, separate from the file name? The example
https://github.com/eza-community/eza-themes?tab=readme-ov-file#file--and-extension-based-overrides
suggests that perhaps yes, but the color doesn't work for me. In fact, if I set a custom icon it seems to be always black:
Here is my
theme.ymlI can produce the effect I want with ls, using some LS_COLORS hacks
(But being a hack, this has some downsides.)
For reference, a relevant discussion from lsd
lsd-rs/lsd#305
Beta Was this translation helpful? Give feedback.
All reactions