lsd-rs / lsd

The next gen ls command
Apache License 2.0
13.35k stars 433 forks source link

Change default colours used #562

Open meain opened 3 years ago

meain commented 3 years ago

Now that https://github.com/Peltoche/lsd/pull/452 is merged, users should be able to change the colors for lsd to what they like. That said, I was thinking we should probably consider changing the default colors that lsd uses to work in both light and dark colorschems. Using colors less that 16 and avoiding yellow should more or less take care of that. This change is only necessary in the non filename blocks as the filename ones are already using colors from lscolors which works in both cases. This will require changes in user,group and size blocks.

My only concern here is that existing users will have a change in colors if they are not using a custom theme(it a bit better now that they can change back). Just posting it here to get other's thoughts.

zwpaper commented 3 years ago

IMHO, I think we can ship two themes by default, one for dark mode and the other for light.

it became a common case with built-in dark mode and light mode in modern OSs, I think we could catch up with it.

an option like --theme dark/light may be great in my thought, we can go even further by detecting the dark/light mode and switch automatically.

zwpaper commented 3 years ago

so that we will not break the user experience and be compatible with light background.

it also not easy to find a default theme fitting both dark and light mode, IMHO

meain commented 3 years ago

Makes sense, lets go with a --color-theme flag.

About auto detection, I am not sure if we will have a simple way to do dark mode/light mode detection in terminals though. OS level theme detection might not be that reliable as a lot of people use light mode in the OS but dark colors in terminals.

zwpaper commented 3 years ago

totally agree, the auto-detection part needs to be discussed more and let's go with the --color-theme first!

marchank0 commented 1 year ago

--color-theme is not implemented for now, right?

meain commented 1 year ago

While we did not add a flag for this, we have added support to change colors via config file.

meain commented 1 year ago

https://github.com/Peltoche/lsd/issues/365#issuecomment-733095300 This is the closest to the colors in the screenshot in README. Adding it here for reference.

haohanyuzmx commented 6 months ago

Is there any plane to support built-in mode, and auto switch theme by system. (like bat do)