Skip to content
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

Color for Non-Executable Files is now gray for me with version 0.17.0. Everything else seems to be the correct color. #404

Closed
MarkFilus opened this issue Aug 26, 2020 · 7 comments
Labels
kind/bug Something isn't working

Comments

@MarkFilus
Copy link

MarkFilus commented Aug 26, 2020

  • os: Manjaro Linux
  • lsd --version: lsd 0.17.0
  • echo $TERM: xterm-kitty (I can confirm this issue exists with urxvt, and just using the tty terminal with ctr+alt+f2. I've tried to use other users and switching shells and it persists.)
  • echo $LS_COLORS: (Confirmed to be not set)

Expected behavior

The color for Non-Executable Files should be yellow.

Actual behavior

The color for Non-Executable Files is now gray for me which is my terminal default text color. This started happening a few months ago. This only effects Non-Executable Files, and everything else seems normal. I have no clue what could be causing this.

lsd_missing_color

@MarkFilus MarkFilus added the kind/bug Something isn't working label Aug 26, 2020
@MarkFilus
Copy link
Author

MarkFilus commented Aug 26, 2020

I've found a work around by rolling back to 0.16.0.
lsd_missing_color_0 16 0

It also seems like the colors are a bit different, execfile is a brighter green. I wonder what has changed between 0.16 and 0.17 to make the colors different. It's probably not the terminal configuration, since I've tried it with multiple terminals and the TTY.

@MarkFilus MarkFilus changed the title Color for Non-Executable Files is now gray. Everything else seems to be the correct color. Color for Non-Executable Files is now gray in 0.17.0. Everything else seems to be the correct color. No issues on 0.16.0 Aug 27, 2020
@MarkFilus MarkFilus changed the title Color for Non-Executable Files is now gray in 0.17.0. Everything else seems to be the correct color. No issues on 0.16.0 Color for Non-Executable Files is now gray for me with version 0.17.0. Everything else seems to be the correct color. Aug 27, 2020
@meain
Copy link
Member

meain commented Aug 27, 2020

We had changed hard coded values of colors for filenames and made it so that we take all the values from LS_COLORS env variable in 0.17.0 release. So, the color values are coming from $LS_COLORS variable in the env.


You can use LS_COLORS for customizing the colors of the folders and files. Simple write up on what they are. http://www.bigsoft.co.uk/blog/2008/04/11/configuring-ls_colors

A tool like sharkdp/vivid can help you to generate LS_COLORS if you don't find any that you like. Also maybe checkout https://github.com/trapd00r/LS_COLORS .

@MarkFilus
Copy link
Author

Thanks that's really helpful. Fixed my issue on the latest version (and changed the colors on 0.16.0 too).
I was confused for two reasons:

  1. The README is out of date, and says colors cannot be customized in the FAQ section.
  2. My LS_COLORS environment variable 100% was unset.

Reason 2 suggests there is a change introduced in 0.17.0 that seems to use the terminal colors if LS_COLORS is unset.

Both versions 0.16.0 and 0.17.0, I can confirm use the LS_COLORS variable after I set it through one of the links you sent. Version 0.16.0 seems to use the colors from the chart that is currently on the FAQ section if LS_COLORS is not set, version 0.17.0 seems to use the 16 bit terminal colors (notice how the greens are the same in the lsd output and the terminal syntax highlighting above).

@meain
Copy link
Member

meain commented Aug 28, 2020

Oh, my bad. We had support for LS_COLORS from 0.16.0, but we changed from using hardcoded defaults in lsd to defaults from the lscolors parsing library that we are using in 0.17.0. Btw, as of now only the colors of the filenames can be changed, not the other blocks. We are working towards introducing a config which will let you customize those colors as well.

Also thanks for reminding about the readme, that needs update now.

@foxale
Copy link

foxale commented Oct 23, 2020

I have the same issue. What's the solution to get the exact same colors as in 0.16.0?

@MarkFilus
Copy link
Author

@foxale The fastest solution is to use version 0.16.0. Other than that you would have to generate an LS_COLORS that matches the colors used in 0.16.0.

@foxale
Copy link

foxale commented Aug 21, 2021

A temporary fix: #365 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants