-
-
Notifications
You must be signed in to change notification settings - Fork 659
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
Add code for file types (image, document, etc.) in EXA_COLORS #786
base: master
Are you sure you want to change the base?
Add code for file types (image, document, etc.) in EXA_COLORS #786
Conversation
- Added `mh` in LS_COLORS, seems like it was forgotten - Add ten new codes in EXA_COLORS for file types
Yeah, I agree: there's way too much functionality stuffed into that environment variable. The reason exa highlights lots of file types by default is because I didn't want to muck around with defining a long complicated configuration string when instead I could just write code. Something I'm worried about is the categories of file type becoming "ossified" before thought has been put into which categories there should be. Right now there's temp files, immediate files, images, videos, music, lossless music, cryptographic stuff, "documents", archives, and build artefacts. But the only reason there are these ten categories is because those were the sort of files I was regularly dealing with in 2014. Seven years later, I don't keep lossless music anymore, I don't have to work with cryptographic files, and I see a lot more text files ending in A couple other things about this:
|
Well, maybe it’s time to rethink those categories then. Categories I feel are useful:
Categories I feel are not that useful:
Categories I feel could be added:
So, do you think exa should ignore
Yeah, I think immediate is confusing and found that it may make sense to include README since they very often include build instructions. README could also be reclassified in a new category as proposed above.
Yep, I believe it makes sense to think of exa’s colouring as first taking “type” into account, i.e. the different types of files for the filesystem (based on filesystem type), and then, if they are normal files, what kind of normal files they are (based on name).
I don’t know. I think ideally, I would want a config file where you can define colors for categories, and easily put a bunch of globs (maybe something very simple like taking into account only stars at the beginning of the pattern, at the end, or both) and assign them a color, and then it won’t be necessary to worry about a long environment variable. In the meantime, I wanted to be able to define 100% of exa’s colours without needing to compile my own version with a patch. |
Seems to me that |
We already take colors from |
Sorry if this is a noob question: exa uses |
@roland-rollo: |
@roland-rollo Oops, sorry, I meant read up |
@eggbean Thanks! I read it all and now better understand what's going on. Is it any helpful that there is coreutils written in Rust and so dircolors? I started learning Rust, so at this moment I still can't help, but if I understand correctly, there isn't now any elegant way to deal with modification of colors for things that are hardcoded? |
@roland-rollo I don't know what you mean. There are default colours for |
mh
in LS_COLORS, seems like it was forgottenFix #363
In the future, we should probably use some kind of config file for theme, because
EXA_COLORS
tends to be long and cryptic.