eza icon indicating copy to clipboard operation
eza copied to clipboard

bug: unset permission bit "invisible", customizing color for that bit has no effect if unset

Open TLINDEN opened this issue 1 year ago • 2 comments

I am using xfce-terminal with the solarized-dark theme and latest eza.

This is the eza command I'm using:

eza --group-directories-first --time-style '+%Y-%m-%d %H:%M' --git -la

This is how the permission bits are looking (notice the missing dashes of unset permissions): ezadark

My first thought was that maybe the coloring is wrong somehow, so I tried to change it:

EZA_COLORS="gw=35: tw=35"

This how it looks: ezagwbit

As you can see, the gw had the desired effect on the group write bit (it's now magenta), but the tw had no effect on the unset other write bit. It is still invisible.

Note, that the characters ARE being printed, I can copy them and the dashes are there. I can also just switch to another color theme and then I can see the dashes of unset bits. This behavior ONLY happens with the solarized theme.

So, it seems as dashes of unset bits are always being printed using the same foreground color (dark green) as is being used in solarized mode background (which of course is just an unhappy coincidence, I know), any color settings are being ignored if the permission bit in question is unset.

TLINDEN avatar May 16 '24 17:05 TLINDEN

If any solarized folks find this, I was able to fix this with the latest version of eza and a custom theme.yml

mkdir -p ~/.config/eza
echo 'punctuation: {foreground: Default}' > ~/.config/eza/theme.yml

Make sure to set EZA_CONFIG_DIR=~/.config/eza in your shell, and voilà!

image

Cbeck527 avatar Oct 02 '24 16:10 Cbeck527

Thanks a lot, works like a charm!

TLINDEN avatar Oct 02 '24 18:10 TLINDEN

Ohh so this is simply a theme problem for solarized users? Not sure how pervasive this problem is, if people are hitting this, please write here to indicate that you're affected, it will help determine whether or not we should perhaps change this or it's a fringe issue better left to individual users to fix via a theme file (that we may provide in the themes repo?)

cafkafk avatar Oct 12 '24 14:10 cafkafk

A tool intended to be a proper ls replacement should work out of the box.

TLINDEN avatar Oct 14 '24 05:10 TLINDEN

Ohh so this is simply a theme problem for solarized users?

Solarized dark users will definitely run into this, but I think that any terminal theme could run into this if the punctuation color is the same as the term background color. FWIW, I looked to see if there was a solarized theme in the repo and didn't find one, so publishing one would definitely help folks out!

Appreciate you checking in @cafkafk 🙂

Cbeck527 avatar Oct 14 '24 15:10 Cbeck527

Solarized dark users will definitely run into this, but I think that any terminal theme could run into this if the punctuation color is the same as the term background color.

I tried out the kitty solarized theme, both for eza latest and bat 2024-10-17_06-15_2 2024-10-17_06-15_1

First, this being invisible seems to not be an universal solarized property, but also, I have to admit that the punctuation color chosen should simply not be equivalent to the background or with such a low contrast to it that it's unreadable, that feels like an issue with the theme itself. Closing this in favor of https://github.com/altercation/solarized/issues/422.

FWIW, I looked to see if there was a solarized theme in the repo and didn't find one, so publishing one would definitely help folks out!

We'd definitely welcome such a contribution to the themes repo. Feel free to open an issue there.

cafkafk avatar Oct 17 '24 04:10 cafkafk

(Another "fix" is to set $EZA_COLORS to xx=0)

malob avatar Dec 28 '24 05:12 malob

For anyone looking to fix it, this worked for me sed -i 's|^punctuation: {foreground: DarkGray, is_bold: true}$|punctuation: {foreground: Default}|' ~/.config/eza/theme.yml

Modified version of @Cbeck527 's fix.

ananthu-sk avatar May 12 '25 10:05 ananthu-sk

This doesn't work for me on macOS with Solarized Dark. I tried putting that snippet in both ~/.config/eza and ~/Library/Application Support/eza. Any ideas?

Edit: export EZA_COLORS="xx=0" fixed the issue. Thanks for the suggestion!

johalun avatar Jun 02 '25 15:06 johalun