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

feat: Add "low color" mode #315

Open
twolodzko opened this issue Sep 14, 2023 · 3 comments
Open

feat: Add "low color" mode #315

twolodzko opened this issue Sep 14, 2023 · 3 comments
Labels
enhancement New feature or request features › ui

Comments

@twolodzko
Copy link

In some color configurations, eza uses a lot of colors for different items in the output. I personally find it distracting (mostly the file permissions in -l mode). I could use --color never, but I wouldn't mind if eza colored only the file and directory names as ls. I could also use EXA_COLORS to individually turn off each of the components, but this is not well documented and needs individually blacklisting each of them. I'd love to have something like --color ls which just uses the same colors as ls does, not more.

@PThorpe92 PThorpe92 added enhancement New feature or request features › ui labels Sep 14, 2023
@PThorpe92
Copy link
Member

I think this is a good combination of #139 and some of #245

To be able to offer some custom themes in a config file would be awesome :D

@bew
Copy link
Contributor

bew commented Sep 18, 2023

eza uses a lot of colors for different items in the output. I personally find it distracting

I fully agree, it's the first things I changed when switching to exa some long time ago.

Here is the theme I use:

# Config eza/exa colors to shades of grey instead of a distractful bright colors
EXA_COLORS=""
EXA_COLORS+="da=38;5;243:" # darker
EXA_COLORS+="uu=38;5;239:gu=38;5;239:" # darker username & group
EXA_COLORS+="sn=38;5;29:sb=38;5;100:" # darker and better contrast for file size
# Darker permissions (shades of grey)
EXA_COLORS+="ur=38;5;240:uw=38;5;244:ux=38;5;248:ue=38;5;248:" # user permissions
EXA_COLORS+="gr=38;5;240:gw=38;5;244:gx=38;5;248:" # group permissions
EXA_COLORS+="tr=38;5;240:tw=38;5;244:tx=38;5;248:" # other permissions
EXA_COLORS+="xa=38;5;24:" # xattr marker ('@')
EXA_COLORS+="xx=38;5;240:" # punctuation ('-')
export EXA_COLORS

Which looks like this:
Screenshot_20230918_191720

I didn't do any changes for the filenames colors, I might in the future ¯_(ツ)_/¯

@bew
Copy link
Contributor

bew commented Sep 24, 2023

I edited my theme to have distinct colors for file size of different magnitudes, by replacing sn/sb config line with:

# Color file sizes by order of magnitude
EXA_COLORS+="nb=38;5;239:"                #  0  -> <1KB : grey
EXA_COLORS+="nk=38;5;29:uk=38;5;100:"     # 1KB -> <1MB : green
EXA_COLORS+="nm=38;5;26:um=38;5;32:"      # 1MB -> <1GB : blue
EXA_COLORS+="ng=38;5;130:ug=38;5;166;1:"  # 1GB -> <1TB : orange
EXA_COLORS+="nt=38;5;160:ut=38;5;197;1:"  # 1TB -> +++  : red

Screenshot_20230924_135554

I think it looks pretty nice 😃 ✨

test files were created with truncate -s 123g 3_giga for example to simulate file sizes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request features › ui
Projects
None yet
Development

No branches or pull requests

3 participants