Coder Social home page Coder Social logo

Comments (6)

eggbean avatar eggbean commented on May 15, 2024

exa/eza uses the $LS_COLORS variable, so you can change the colours for any file with a dir_colors file which is used to set that variable.

eg.

.md 01;32

This will change all files with the .md extension to green (dependent on your terminal ANSI theme), but you an also use the 256 colour range or probably even 24-bit colours by now (I don't have any desire to even look into that for $LS_COLORS).

Or you can set a colour just for files called README.md like this:

*README.md 01;32

This is the current state of my dir_colors file as an example (forget the version number, as I never updated it) http://ix.io/4FQP

$ man dircolors

https://www.baeldung.com/linux/ls-output-color-files-directories

from eza.

holmesrichards avatar holmesrichards commented on May 15, 2024

I think you missed my point. Yes, you can do that, but you have to do it for each individual file name or type in the category that gets the undesired color, and you have to update your configuration any time a new addition is made to that category. What I would like is a single code to change the color for all files of that category.

from eza.

eggbean avatar eggbean commented on May 15, 2024

There's also the $EXA_COLORS variable which overrides $LS_COLORS and has some "categories", but I cannot find the keys for them - you'll have to look at the source code.

https://the.exa.website/features/colours
https://the.exa.website/docs/colour-themes

But I stopped using $EXA_COLORS early on for files (only use it to change the colours of exa elements) as these "categories" don't include all filetypes you may come across, as this is something that continuously changes. There were many cryptography filetypes that were missing, which led me to just use dircolors, which is completely flexible, extensible and granular.

I've added quite a lot of filetypes to my already quite lengthy dircolors file - most recently .bz3 and I'll probably add .bz4 one day. The time taken for all the additions and changes using vim over the years has taken less time than this conversation.

from eza.

Terraphice avatar Terraphice commented on May 15, 2024

Frankly it's archaic to rely on the user specifying colors for each individual file type in an ENV.

The ability to write, share, and import themes is basic functionality for most modern CLI programs that heavily involve text. (Think bat.)

+1

from eza.

PThorpe92 avatar PThorpe92 commented on May 15, 2024

The ability to write, share, and import themes is basic functionality for most modern CLI programs that heavily involve text. (Think bat.)

Yeah this was some of the thought process behind #139
Hopefully after some of the bigger changes going on and features like the PR to close the issue are added 👍

from eza.

Terraphice avatar Terraphice commented on May 15, 2024

Yeah this was some of the thought process behind #139 Hopefully after some of the bigger changes going on and features like the PR to close the issue are added 👍

Yeah, I used to use LSD on my Windows devices as an alternative to a MSYS Exa install, and this was definitely one of the larger parts of it that I missed.

from eza.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.