zz85 / space-radar

Disk And Memory Space Visualization App built with Electron & d3.js
https://github.com/zz85/space-radar-electron/releases
1.38k stars 80 forks source link

color by type #34

Open vanzandtj opened 7 years ago

vanzandtj commented 7 years ago

I suggest assigning colors as follows: For files, use the same colors as GNU ls by respecting the environment variable LS_COLORS. If that variable is not set, then use the defaults printed by "dircolors -p". For directories: For .git, foo.git, .svn, and other configuration management directories: use the same color as for a .tar file. For .../bin, /Applications, etc: same as an executable, or a .exe file. For ~/Pictures: same as a .jpg file. Otherwise, a directory should inherit the color of the contents, with votes weighted by space. I.e., add up the space for all the green files & subdirectories, all the red files & subdirectories, etc. Whichever color accounts for the most space is assigned to the directory.

Coloring by content would make it easier to spot duplicate collections of files, because those directories would be assigned the same color. To make this even easier, one could construct a directory color by averaging over the color of its contents. However, I suggest this be an option rather than the default.

zz85 commented 6 years ago

Thanks for the suggestions, I'll take this into consideration when I start working on colors.