-
-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Themes #92
Comments
Hi @erusev , There is currently a PR about an integration with the LS_COLOR variable (#84), it should allow to customize some of the colors. If you need a deeper color integration, for the sized for example, I think it would be possible to create a theme, the A possible solution would be to create a new flags allowing to load a file describing the color theme. Something like: lsd --theme-file=~/.my-custom-theme.json and inside {
"file": 230, // Cornsilk1
"dir": 33, // DodgerBlue1
...
} What do you think of it? |
Yes, making it possible to load the theme from a separate file would be ideal - it could be a flag that sets it or a config variable as in https://github.com/sindresorhus/pure (under the options section). |
Hi, I am interested in working on this when I find the time, I have some questions though: |
Hi @kmoschcau , thanks for the proposition!
Personally I prefer json but I guess that YAML is more adequate for human redable configurations. If it's possible to handle the two it would be perfect but it's not a priority.
Absolutely! The goal would be to accept any flags as a configuration.
I guess it would be a good idea. In any cases, it would be great if we can override the default (or XDG) path by one specified as an argument. Don't hesitate, if you have more questions or if you need reviews |
I am not sure about arguments to set the paths, but the specification lists some environment variables to set those paths. But the rest sounds good to me, I hope I can find the free time to work on this soon. |
One thing I just found out about recently: YAML is actually a superset of JSON, so any valid JSON is also valid YAML. So a good YAML parser should support both. |
What about TOML? It serves a similar purpose as YAML, and it is quite a bit simpler. |
That depends a bit on what kind of config values one wants to store. TOML could actually be better for this case (because simple), but I have not really seen it outside of the Rust ecosystem yet. Might confuse some users, but also might not because it is so simple. |
I just had a look at the TOML specification and to be honest, if it gets to more complicated stuff I find YAML to be easier to comprehend as a user. I will have a look at a first implementation with YAML. |
@Peltoche I have a question concerning code organization. Since the |
Hi @kmoschcau, I think this split would make total sens. Moving the flag parsing next to the meta options would make it easier to read as we can see all the flag lifecycle in one place. |
Some things also came to mind: We probably need some additional flags or just simply Also I think the And another thing I came across that is really confusing: Why is the |
Just to give an update. I am so far done with implementing on my side, I just have some catching up to do with master. I hope I don't miss anything. :D |
any updates on this? lsd looks lovely but not using $LS_COLORS is a rather big turnoff for me |
I am still waiting on my configuration file merge request to be merged. Once that happens, I would start with adding theme configuration things. |
@Peltoche - please merge :) |
hi @kmoschcau , may I ask how is the progress of theme configuration? maybe we can split the work and make it happen faster together |
as this is requested from time to time, I am trying to start my work for lsd theme, If anyone has started, please let me know! |
This should certainly be easier now, since you can now save if in the config file. I'm not sure whether it would be beneficial to be able to specify an entire theme via CLI options. |
Hi @kmoschcau , thanks for the work on the config file. I don't think to specify an entire theme via CLI options would be a great idea, this would make the options too complicated. I will implement one option(and one in the config file) to specify the path of the theme, as a standalone theme file would be easier to switch between themes. |
There is some merit to putting themes into their own files. But have you also considered putting them in the config file with the key being their name? |
putting themes in a single config file make it simpler, that is good! but I preferred standalone file because:
the theme name as the key may also be a good choice, but in my personal experience, I don't like the dynamic yaml key much... |
Well there wouldn't really be much dynamic about. The way I would make it is to have a root level key But yes you could also just replace that mechanic by pulling out the color specifications into their own files. If you do that, it is worth thinking about putting those into their own subdir. |
fix lsd-rs#92 Signed-off-by: zwPapEr <[email protected]>
fix lsd-rs#92 Signed-off-by: zwPapEr <[email protected]>
fix lsd-rs#92 Signed-off-by: zwPapEr <[email protected]>
It seems like the colors that lsd uses are hard coded. It'd be awesome if it supported custom colors.
I'd love to develop a theme that uses colors for file names and shades of gray for everything else - lighter shade for more recent dates and larger file sizes.
The text was updated successfully, but these errors were encountered: