5

I want to change the color of particular file type:

  • for .c files red
  • for .out files green
  • for .sh files orange

Like this, how to make these colors as default color for the corresponding file type?

Jorge Castro
  • 71,754
Omkant
  • 193

3 Answers3

3

I needed the color difference whenever try ls -l or ls commmand.

So I just used $LS_COLOR variable and modified it like this.

LS_COLORS='*.c=01;32:*.out=31:*.sh=01;35:'

for more this source about bash

Omkant
  • 193
1

Use the dircolors command. For example if you want to have the Solarised theme, download the required dircolors database file from this link To use it just do the following:

eval `dircolors /path/to/dircolorsdb`

For more instructions refer the readme of the previous link.

Some other useful links:

saji89
  • 12,007
0

By writing condition for gtk~.css or some action for Nautilus.
Or maybe just using custom iconset?

Need to say, such terminal command like ls is using folders and files coloring, and perhaps this feature have the base to be extended.

Look this answer: Can we have Mac like 'labels' on GNOME?

swift
  • 3,281
  • 2
  • 23
  • 46