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

Add basic programmer's colors #23

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

defr0std
Copy link

@defr0std defr0std commented Jun 3, 2021

Coloring the files which programmers are often dealing with:

  • Source code files for popular languages. Colored in green like documents because that's what they essentially are.
  • Project-like files (c-sharp projects, solutions, etc) stand out in red for an easier identification among the source code files.
  • Configuration files (json, yaml, etc) also stand out in yellow for easier identification.
  • Common binary files. Colored as temp/ignores because essentially they can be reconstructed from sources.
  • Stylesheets colored in magenta to signal that this is UI related. P.S. I'd also propose to color images/videos in magenta too. Then magenta would represent everything "vivid".

The list is not exhaustive, we can add more popular types of files later if needed.

Fixes #22.

defr0std added 3 commits June 3, 2021 09:29
Coloring the files which programmers are often dealing with:
- Source code files for popular languages
- Common binary and installable files
@defr0std
Copy link
Author

defr0std commented Aug 6, 2021

@arcticicestudio, could you please have a look?

@ghost
Copy link

ghost commented Aug 13, 2021

Is it possible to create another file for this (ex: src/dir_colors_programming) ? I'm a programmer and I don't like when my 'ls' looks like a christmas tree (personal taste). Can we just keep the "main" src/dir_colors clean and simple please?

@defr0std
Copy link
Author

Yeah, I tried to separate this into multiple files, but then the installation process becomes cumbersome. Currently, there is one file that you could symlink and then run dircolors on it, which is very convenient.

With multiple files, we'd need first to merge the files into one. We can add a shell script for it (e.g. install.sh), which would by default merge the files and place the result into ~/.dir_colors. There would be no auto-update on git pull then, but I guess you could always re-run install.sh when needed. After all, this repository does not seem to be updated often.

Invoking dircolors utility twice doesn't work either because it outputs the code "LS_COLORS=xxx", so the second invocation would overwrite the first one, unless we start messing with its output.

P.S. Regarding the christmas tree, I don't like it either and I tried to avoid it as much as possible. For example, most of the source code file combinations are green (like .cc and .h for c++, .ts and .html for frontend, etc), so typically your project would have a single dominant color. The exceptions would be when you have a large mix of source/configuration files (e.g. c++ and text files) in the same folder, but I think this is less common. Directories with images/fonts/stylesheets would also look quite colorful, but that could be ok because you typically need to find something to edit.

@svengreb svengreb self-requested a review as a code owner April 9, 2023 13:13
@svengreb svengreb force-pushed the develop branch 2 times, most recently from 9407669 to 2f5b939 Compare April 10, 2023 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Programmer's colors
1 participant