Skip to content

Instantly share code, notes, and snippets.

@spajak
Last active March 8, 2022 17:09
Show Gist options
  • Select an option

  • Save spajak/cce52172230da361a477ec851cbdee5b to your computer and use it in GitHub Desktop.

Select an option

Save spajak/cce52172230da361a477ec851cbdee5b to your computer and use it in GitHub Desktop.
Improved ~/.dircolors for dark background. Color changes from Debian defaults are mostly cosmetic. Added a few popular multimedia extensions and removed the archaic ones.
# Improved ~/.dircolors designed for dark background
# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# Copying and distribution of this file, with or without modification,
# are permitted provided the copyright notice and this notice are preserved.
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
# slackware version of dircolors) are recognized but ignored.
# Below are TERM entries, which can be a glob patterns, to match
# against the TERM environment variable to determine if it is colorizable.
TERM Eterm
TERM ansi
TERM *color*
TERM con[0-9]*x[0-9]*
TERM cons25
TERM console
TERM cygwin
TERM dtterm
TERM gnome
TERM hurd
TERM jfbterm
TERM konsole
TERM kterm
TERM linux
TERM linux-c
TERM mlterm
TERM putty
TERM rxvt*
TERM screen*
TERM st
TERM terminator
TERM tmux*
TERM vt100
TERM xterm*
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
RESET 0 # reset to "normal" color
DIR 01;34 # directory
LINK 01;36 # symbolic link. (If you set this to 'target' instead of a numerical value, the color is as for the file pointed to.)
EXEC 01;32 # this is for files with execute permission
MULTIHARDLINK 01;37 # regular file with more than one link
FIFO 00;33 # pipe
SOCK 00;35 # socket
DOOR 00;35 # door
BLK 00;33 # block device driver
CHR 00;33 # character device driver
ORPHAN 00;31;40 # symlink to nonexistent file, or non-stat'able file ...
MISSING 01;30;40 # ... and the files they point to
SETUID 00;30;41 # file that is setuid (u+s)
SETGID 00;30;43 # file that is setgid (g+s)
CAPABILITY 00;30;41 # file with capability
STICKY 00;30;44 # dir with the sticky bit set (+t) and not other-writable
STICKY_OTHER_WRITABLE 00;30;46 # dir that is sticky and other-writable (+t,o+w)
OTHER_WRITABLE 00;30;42 # dir that is other-writable (o+w) and not sticky
# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')
# Archives or compressed
.tar 01;31
.tgz 01;31
.arc 01;31
.arj 01;31
.taz 01;31
.lha 01;31
.lz4 01;31
.lzh 01;31
.lzma 01;31
.tlz 01;31
.txz 01;31
.tzo 01;31
.t7z 01;31
.zip 01;31
.z 01;31
.dz 01;31
.gz 01;31
.lrz 01;31
.lz 01;31
.lzo 01;31
.xz 01;31
.zst 01;31
.tzst 01;31
.bz2 01;31
.bz 01;31
.tbz 01;31
.tbz2 01;31
.tz 01;31
.deb 01;31
.rpm 01;31
.jar 01;31
.war 01;31
.ear 01;31
.sar 01;31
.rar 01;31
.alz 01;31
.ace 01;31
.zoo 01;31
.cpio 01;31
.7z 01;31
.rz 01;31
.cab 01;31
.wim 01;31
.swm 01;31
.dwm 01;31
.esd 01;31
# Image formats
.jpg 01;35
.jpeg 01;35
.jpe 01;35
.png 01;35
.gif 01;35
.bmp 01;35
.ico 01;35
.tif 01;35
.tiff 01;35
.webp 01;35
.pbm 01;35
.pgm 01;35
.ppm 01;35
.pnm 01;35
.svg 01;35
.svgz 01;35
.xbm 01;35
.xpm 01;35
.mng 01;35
.apng 01;35
.eps 01;35
.xcf 01;35
.cgm 01;35
.tga 01;35
.pcx 01;35
.xwd 01;35
.emf 01;35
.emz 01;35
# Audio formats
.mp3 01;36
.mp2 01;36
.ogg 01;36
.oga 01;36
.opus 01;36
.flac 01;36
.aac 01;36
.m4a 01;36
.mka 01;36
.wav 01;36
.wv 01;36
.ape 01;36
.mpc 01;36
.ac3 01;36
.pcm 01;36
.au 01;36
.wma 01;36
.ra 01;36
# Video formats
.avi 01;33
.mkv 01;33
.mp4 01;33
.webm 01;33
.ogv 01;33
.ogx 01;33
.mpg 01;33
.mpeg 01;33
.m2v 01;33
.vob 01;33
.yuv 01;33
.nuv 01;33
.mjpg 01;33
.mjpeg 01;33
.m4v 01;33
.wmv 01;33
.asf 01;33
.flv 01;33
.rm 01;33
.rmvb 01;33
.mov 01;33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment