lsd icon indicating copy to clipboard operation
lsd copied to clipboard

Change default colours used

Open meain opened this issue 4 years ago • 9 comments

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.

meain avatar Oct 08 '21 08:10 meain

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 avatar Oct 08 '21 10:10 zwpaper

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

zwpaper avatar Oct 08 '21 10:10 zwpaper

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.

meain avatar Oct 08 '21 10:10 meain

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

zwpaper avatar Oct 08 '21 10:10 zwpaper

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

marchank0 avatar Nov 30 '22 16:11 marchank0

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

meain avatar Dec 01 '22 04:12 meain

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.

meain avatar Feb 03 '23 08:02 meain

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

haohanyuzmx avatar Apr 01 '24 02:04 haohanyuzmx