├── .editorconfig ├── .gitignore ├── .gitmodules ├── .travis.yml ├── LICENSE ├── README.md ├── bin └── dirchromatic ├── dirchromatic ├── __init__.py ├── cli.py ├── generator.py ├── logger │ ├── __init__.py │ ├── colour.py │ ├── level.py │ └── logger.py ├── types.py ├── util │ ├── __init__.py │ ├── module.py │ └── string.py └── writer.py ├── template.tmpl └── types.yaml /.editorconfig: -------------------------------------------------------------------------------- 1 | # Unix-style newlines with a newline ending every file 2 | [*] 3 | end_of_line = lf 4 | insert_final_newline = true 5 | 6 | # Matches multiple files with brace expansion notation 7 | # Set default charset 8 | [*.{js,py}] 9 | charset = utf-8 10 | 11 | # 4 space indentation 12 | [*.py] 13 | indent_style = space 14 | indent_size = 4 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/python,macos,virtualenv,vim,sublimetext,visualstudiocode 3 | 4 | ### macOS ### 5 | *.DS_Store 6 | .AppleDouble 7 | .LSOverride 8 | 9 | # Icon must end with two \r 10 | Icon 11 | 12 | 13 | # Thumbnails 14 | ._* 15 | 16 | # Files that might appear in the root of a volume 17 | .DocumentRevisions-V100 18 | .fseventsd 19 | .Spotlight-V100 20 | .TemporaryItems 21 | .Trashes 22 | .VolumeIcon.icns 23 | .com.apple.timemachine.donotpresent 24 | 25 | # Directories potentially created on remote AFP share 26 | .AppleDB 27 | .AppleDesktop 28 | Network Trash Folder 29 | Temporary Items 30 | .apdisk 31 | 32 | ### Python ### 33 | # Byte-compiled / optimized / DLL files 34 | __pycache__/ 35 | *.py[cod] 36 | *$py.class 37 | 38 | # C extensions 39 | *.so 40 | 41 | # Distribution / packaging 42 | .Python 43 | env/ 44 | build/ 45 | develop-eggs/ 46 | dist/ 47 | downloads/ 48 | eggs/ 49 | .eggs/ 50 | lib/ 51 | lib64/ 52 | parts/ 53 | sdist/ 54 | var/ 55 | wheels/ 56 | *.egg-info/ 57 | .installed.cfg 58 | *.egg 59 | 60 | # PyInstaller 61 | # Usually these files are written by a python script from a template 62 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 63 | *.manifest 64 | *.spec 65 | 66 | # Installer logs 67 | pip-log.txt 68 | pip-delete-this-directory.txt 69 | 70 | # Unit test / coverage reports 71 | htmlcov/ 72 | .tox/ 73 | .coverage 74 | .coverage.* 75 | .cache 76 | nosetests.xml 77 | coverage.xml 78 | *,cover 79 | .hypothesis/ 80 | 81 | # Translations 82 | *.mo 83 | *.pot 84 | 85 | # Django stuff: 86 | *.log 87 | local_settings.py 88 | 89 | # Flask stuff: 90 | instance/ 91 | .webassets-cache 92 | 93 | # Scrapy stuff: 94 | .scrapy 95 | 96 | # Sphinx documentation 97 | docs/_build/ 98 | 99 | # PyBuilder 100 | target/ 101 | 102 | # Jupyter Notebook 103 | .ipynb_checkpoints 104 | 105 | # pyenv 106 | .python-version 107 | 108 | # celery beat schedule file 109 | celerybeat-schedule 110 | 111 | # dotenv 112 | .env 113 | 114 | # virtualenv 115 | .venv 116 | venv/ 117 | ENV/ 118 | 119 | # Spyder project settings 120 | .spyderproject 121 | 122 | # Rope project settings 123 | .ropeproject 124 | 125 | ### SublimeText ### 126 | # cache files for sublime text 127 | *.tmlanguage.cache 128 | *.tmPreferences.cache 129 | *.stTheme.cache 130 | 131 | # workspace files are user-specific 132 | *.sublime-workspace 133 | 134 | # project files should be checked into the repository, unless a significant 135 | # proportion of contributors will probably not be using SublimeText 136 | # *.sublime-project 137 | 138 | # sftp configuration file 139 | sftp-config.json 140 | 141 | # Package control specific files 142 | Package Control.last-run 143 | Package Control.ca-list 144 | Package Control.ca-bundle 145 | Package Control.system-ca-bundle 146 | Package Control.cache/ 147 | Package Control.ca-certs/ 148 | Package Control.merged-ca-bundle 149 | Package Control.user-ca-bundle 150 | oscrypto-ca-bundle.crt 151 | bh_unicode_properties.cache 152 | 153 | # Sublime-github package stores a github token in this file 154 | # https://packagecontrol.io/packages/sublime-github 155 | GitHub.sublime-settings 156 | 157 | ### Vim ### 158 | # swap 159 | [._]*.s[a-v][a-z] 160 | [._]*.sw[a-p] 161 | [._]s[a-v][a-z] 162 | [._]sw[a-p] 163 | # session 164 | Session.vim 165 | # temporary 166 | .netrwhist 167 | *~ 168 | # auto-generated tag files 169 | tags 170 | 171 | ### VirtualEnv ### 172 | # Virtualenv 173 | # http://iamzed.com/2009/05/07/a-primer-on-virtualenv/ 174 | [Bb]in 175 | [Ii]nclude 176 | [Ll]ib 177 | [Ll]ib64 178 | [Ll]ocal 179 | [Ss]cripts 180 | pyvenv.cfg 181 | pip-selfcheck.json 182 | 183 | ### VisualStudioCode ### 184 | .vscode/* 185 | !.vscode/settings.json 186 | !.vscode/tasks.json 187 | !.vscode/launch.json 188 | !.vscode/extensions.json 189 | 190 | # End of https://www.gitignore.io/api/python,macos,virtualenv,vim,sublimetext,visualstudiocode 191 | 192 | .dircolors 193 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/pyyaml"] 2 | path = lib/pyyaml 3 | url = https://github.com/yaml/pyyaml 4 | [submodule "types"] 5 | path = types 6 | url = https://github.com/karlding/dirchromatic-types.git 7 | branch = master 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | 3 | python: 4 | - "2.6" 5 | - "2.7" 6 | - "3.3" 7 | 8 | before_install: 9 | - git submodule update --init --recursive 10 | 11 | install: 12 | - sudo -H pip install --upgrade pip 13 | 14 | script: 15 | - bin/dirchromatic 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 karl ding 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dirchromatic 2 | 3 | [![Build Status](https://travis-ci.org/karlding/dirchromatic.svg?branch=master)](https://travis-ci.org/karlding/dirchromatic) 4 | 5 | programatically generate your ``.dircolors`` file (for use with ``LS_COLORS``) 6 | 7 | The idea behind dirchromatic is that usually, when you're configuring your ``.dircolors`` file, you want to assign the same colours to similar file types (images, documents, videos). So instead, we can maintain a list of file extensions, and simply "tag" each type with the appropriate colours. Then, it will generate an appropriate ``.dircolors`` file that can be copied (or symlinked) as appropriate. 8 | 9 | ## Getting Started 10 | ```bash 11 | git clone https://github.com/karlding/dirchromatic.git && cd dirchromatic/ 12 | git submodule update --init --recursive 13 | bin/dirchromatic 14 | ``` 15 | 16 | Then copy the generated ``.dircolors`` file to ``$HOME/.dircolors`` (or symlink it), and add the following to your ``~/.bashrc`` 17 | 18 | ```bash 19 | if [ -r "$HOME/.dircolors" ]; then 20 | eval `dircolors $HOME/.dircolors` 21 | fi 22 | ``` 23 | 24 | ## Usage 25 | ``` 26 | bin/dirchromatic [--types=types.yaml] [--template=template.tmpl] [--output=.dircolors] 27 | ``` 28 | 29 | ## Example 30 | There's a few files included already in the repository, which you can look through and play around with. 31 | 32 | In addition, here's a simplified example 33 | 34 | ### types.yaml 35 | The ``types.yaml`` file lets you register types, and their associated colours. 36 | 37 | ```yaml 38 | - colour: 01;31 39 | description: Archive files 40 | src: types/archive.yaml 41 | - colour: 01;36 42 | src: types/audio.yaml 43 | - colour: 00;35 44 | src: types/image.yaml 45 | ``` 46 | 47 | All paths here are specified relative to where the ``types.yaml`` file is located. 48 | 49 | **Note**: The ``description`` is optional. The ``src`` and ``colour`` parameters are not. 50 | 51 | ### types/archive.yaml 52 | 53 | Each registered type has its own YAML file, which is simply a list of file extensions to apply the type to. 54 | 55 | ```yaml 56 | --- 57 | - 7zip 58 | - rar 59 | - zip 60 | ``` 61 | 62 | ### types/audio.yaml 63 | ```yaml 64 | --- 65 | - mp3 66 | - m4a 67 | - oog 68 | ``` 69 | 70 | ### types/image.yaml 71 | ```yaml 72 | --- 73 | - gif 74 | - jpg 75 | - png 76 | - svg 77 | ``` 78 | -------------------------------------------------------------------------------- /bin/dirchromatic: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | import os 5 | 6 | PROJECT_ROOT_DIRECTORY = os.path.dirname( 7 | os.path.dirname(os.path.realpath(__file__))) 8 | 9 | def inject(lib_path): 10 | path = os.path.join(PROJECT_ROOT_DIRECTORY, 'lib', lib_path) 11 | sys.path.insert(0, path) 12 | 13 | # version dependent libraries 14 | if sys.version_info[0] >= 3: 15 | inject('pyyaml/lib3') 16 | else: 17 | inject('pyyaml/lib') 18 | 19 | if os.path.exists(os.path.join(PROJECT_ROOT_DIRECTORY, 'dirchromatic')): 20 | if PROJECT_ROOT_DIRECTORY not in sys.path: 21 | sys.path.insert(0, PROJECT_ROOT_DIRECTORY) 22 | os.putenv('PYTHONPATH', PROJECT_ROOT_DIRECTORY) 23 | 24 | import dirchromatic 25 | 26 | def main(): 27 | dirchromatic.cli.main() 28 | 29 | if __name__ == '__main__': 30 | main() 31 | -------------------------------------------------------------------------------- /dirchromatic/__init__.py: -------------------------------------------------------------------------------- 1 | from .cli import main 2 | -------------------------------------------------------------------------------- /dirchromatic/cli.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from __future__ import division 3 | from __future__ import print_function 4 | from __future__ import unicode_literals 5 | 6 | import os 7 | import sys 8 | from argparse import ArgumentParser 9 | 10 | from .logger import Logger 11 | from .generator import Generator, DispatchError 12 | from .types import TypeReader, ReadingError 13 | from .writer import OutputWriter 14 | from .util import module 15 | 16 | def add_options(parser): 17 | parser.add_argument('-t', '--types', action='store', dest='types_file', default='types.yaml', help='type file configuration') 18 | parser.add_argument('-s', '--template', action='store', dest='template', default='template.tmpl', help='dircolors file template') 19 | parser.add_argument('-o', '--output', action='store', dest='output', default='.dircolors', help='output file name') 20 | 21 | def read_types(types_file): 22 | reader = TypeReader(types_file) 23 | return reader.get_types() 24 | 25 | def write_file(template, output_file, data): 26 | writer = OutputWriter(template, output_file) 27 | writer.write(data) 28 | 29 | def main(): 30 | log = Logger() 31 | try: 32 | parser = ArgumentParser() 33 | add_options(parser) 34 | options = parser.parse_args() 35 | types = read_types(options.types_file) 36 | if not isinstance(types, list): 37 | raise ReadingError('Types file must be a list of types') 38 | generator = Generator(os.path.dirname(options.types_file)) 39 | line_buffer = generator.generate(types) 40 | template = open(options.template, 'r') 41 | fd = open(options.output, 'w') 42 | write_file(template, fd, line_buffer) 43 | except ReadingError as e: 44 | log.error('%s' % e) 45 | except DispatchError as e: 46 | log.error('%s' % e) 47 | except KeyboardInterrupt: 48 | exit(1) 49 | -------------------------------------------------------------------------------- /dirchromatic/generator.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | import yaml 4 | 5 | from .logger import Logger 6 | 7 | class Generator(object): 8 | def __init__(self, base_directory): 9 | self._log = Logger() 10 | self._setup_context(base_directory) 11 | 12 | def _setup_context(self, base_directory): 13 | path = os.path.abspath(os.path.realpath( 14 | os.path.expanduser(base_directory))) 15 | if not os.path.exists(path): 16 | raise DispatchError('Nonexistent base directory') 17 | self._path = path 18 | 19 | def generate(self, types): 20 | log = self._log 21 | lines = [] 22 | for type in types: 23 | try: 24 | self._log.info('Generating types for %s' % type['src']) 25 | if 'description' in type.keys(): 26 | lines.append('\n## %s' % type['description']) 27 | else: 28 | lines.append('\n##') 29 | lines.extend(self._generate(type)) 30 | except KeyError as e: 31 | raise DispatchError('Type %s is issing key %s' % (type, e)) 32 | except Exception as e: 33 | self._log.error('Error processing %s' % e) 34 | return lines 35 | 36 | def _generate(self, type): 37 | path = os.path.join(self._path, type['src']) 38 | lines = [] 39 | with open(path) as fin: 40 | data = yaml.safe_load(fin) 41 | if data: 42 | longest = max(map(len, data)) 43 | for ext in data: 44 | lines.append(('%s' % ext).ljust(longest + 2) + '%s' % type['colour']) 45 | return lines 46 | 47 | class DispatchError(Exception): 48 | pass 49 | -------------------------------------------------------------------------------- /dirchromatic/logger/__init__.py: -------------------------------------------------------------------------------- 1 | from .logger import Logger 2 | from .level import Level 3 | -------------------------------------------------------------------------------- /dirchromatic/logger/colour.py: -------------------------------------------------------------------------------- 1 | class Colour(object): 2 | NONE = '' 3 | RESET = '\033[0m' 4 | RED = '\033[31m' 5 | GREEN = '\033[32m' 6 | YELLOW = '\033[93m' 7 | BLUE = '\033[94m' 8 | MAGENTA = '\033[95m' 9 | -------------------------------------------------------------------------------- /dirchromatic/logger/level.py: -------------------------------------------------------------------------------- 1 | class Level(object): 2 | NOTSET = 0 3 | DEBUG = 10 4 | INFO = 20 5 | ERROR = 40 6 | -------------------------------------------------------------------------------- /dirchromatic/logger/logger.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | from .colour import Colour 4 | from .level import Level 5 | 6 | class Logger(): 7 | def __init__(self, level = Level.INFO): 8 | self.set_level(level) 9 | 10 | def set_level(self, level): 11 | self._level = level 12 | 13 | def log(self, level, message): 14 | if (level >= self._level): 15 | print('%s%s%s' % (self._color(level), message, self._reset())) 16 | 17 | def debug(self, message): 18 | self.log(Level.DEBUG, message) 19 | 20 | def info(self, message): 21 | self.log(Level.INFO, message) 22 | 23 | def error(self, message): 24 | self.log(Level.ERROR, message) 25 | 26 | def _color(self, level): 27 | """ 28 | Get a color (terminal escape sequence) according to a level. 29 | """ 30 | if not sys.stdout.isatty(): 31 | return '' 32 | elif level < Level.DEBUG: 33 | return '' 34 | elif Level.DEBUG <= level < Level.INFO: 35 | return Colour.YELLOW 36 | elif Level.INFO <= level < Level.ERROR: 37 | return Colour.GREEN 38 | elif Level.ERROR <= level: 39 | return Colour.RED 40 | 41 | def _reset(self): 42 | ''' 43 | Get a reset color (terminal escape sequence). 44 | ''' 45 | if not sys.stdout.isatty(): 46 | return '' 47 | else: 48 | return Colour.RESET 49 | -------------------------------------------------------------------------------- /dirchromatic/types.py: -------------------------------------------------------------------------------- 1 | import os.path 2 | 3 | import yaml 4 | 5 | from .util import string 6 | 7 | class TypeReader(object): 8 | def __init__(self, types_file_path): 9 | self._types = self._read(types_file_path) 10 | 11 | def _read(self, types_file_path): 12 | try: 13 | _, ext = os.path.splitext(types_file_path) 14 | with open(types_file_path) as fin: 15 | data = yaml.safe_load(fin) 16 | return data 17 | except Exception as e: 18 | msg = string.format_lines(str(e)) 19 | raise ReadingError('Could not read types file:\n%s' % msg) 20 | 21 | def get_types(self): 22 | return self._types 23 | 24 | class ReadingError(Exception): 25 | pass 26 | -------------------------------------------------------------------------------- /dirchromatic/util/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karlding/dirchromatic/4b375d65cc7b233b105e574d9f4604398af10b0d/dirchromatic/util/__init__.py -------------------------------------------------------------------------------- /dirchromatic/util/module.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from __future__ import division 3 | from __future__ import print_function 4 | from __future__ import unicode_literals 5 | 6 | import sys 7 | import os.path 8 | 9 | # We keep references to loaded modules so they don't get garbage collected. 10 | loaded_modules = [] 11 | 12 | def load(path): 13 | basename = os.path.basename(path) 14 | module_name, extension = os.path.splitext(basename) 15 | plugin = load_module(module_name, path) 16 | loaded_modules.append(plugin) 17 | 18 | if sys.version_info >= (3, 5): 19 | import importlib.util 20 | 21 | def load_module(module_name, path): 22 | spec = importlib.util.spec_from_file_location(module_name, path) 23 | module = importlib.util.module_from_spec(spec) 24 | spec.loader.exec_module(module) 25 | return module 26 | elif sys.version_info >= (3, 3): 27 | from importlib.machinery import SourceFileLoader 28 | 29 | def load_module(module_name, path): 30 | return SourceFileLoader(module_name, path).load_module() 31 | else: 32 | import imp 33 | 34 | def load_module(module_name, path): 35 | return imp.load_source(module_name, path) 36 | -------------------------------------------------------------------------------- /dirchromatic/util/string.py: -------------------------------------------------------------------------------- 1 | def format_lines(string, amount=2, delimiter='\n'): 2 | whitespace = ' ' * amount 3 | sep = '%s%s' % (delimiter, whitespace) 4 | 5 | return '%s%s' % (whitespace, sep.join(string.split(delimiter))) 6 | -------------------------------------------------------------------------------- /dirchromatic/writer.py: -------------------------------------------------------------------------------- 1 | class OutputWriter(object): 2 | def __init__(self, template, output_file): 3 | self._template = template 4 | self._fd = output_file 5 | 6 | def write(self, data): 7 | template = self._template.read() 8 | lines = '\n'.join(data) 9 | self._fd.write(template.replace('${data}', lines)) 10 | #for line in data: 11 | # self._fd.write("%s\n" % line) 12 | -------------------------------------------------------------------------------- /template.tmpl: -------------------------------------------------------------------------------- 1 | # Configuration file for dircolors, a utility to help you set the 2 | # LS_COLORS environment variable used by GNU ls with the --color option. 3 | 4 | # Copyright (C) 1996, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 5 | # Free Software Foundation, Inc. 6 | # Copying and distribution of this file, with or without modification, 7 | # are permitted provided the copyright notice and this notice are preserved. 8 | # 9 | # You can copy this file to .dir_colors in your $HOME directory to override 10 | # the system defaults. 11 | 12 | # Below, there should be one TERM entry for each termtype that is colorizable 13 | TERM Eterm 14 | TERM ansi 15 | TERM color-xterm 16 | TERM con132x25 17 | TERM con132x30 18 | TERM con132x43 19 | TERM con132x60 20 | TERM con80x25 21 | TERM con80x28 22 | TERM con80x30 23 | TERM con80x43 24 | TERM con80x50 25 | TERM con80x60 26 | TERM console 27 | TERM cygwin 28 | TERM dtterm 29 | TERM gnome 30 | TERM konsole 31 | TERM kterm 32 | TERM linux 33 | TERM linux-c 34 | TERM mach-color 35 | TERM mlterm 36 | TERM putty 37 | TERM putty-256color 38 | TERM rxvt 39 | TERM rxvt-cygwin 40 | TERM rxvt-cygwin-native 41 | TERM rxvt-unicode 42 | TERM screen 43 | TERM screen-256color 44 | TERM screen-bce 45 | TERM screen-w 46 | TERM screen.linux 47 | TERM vt100 48 | TERM xterm 49 | TERM xterm-256color 50 | TERM xterm-color 51 | TERM xterm-debian 52 | 53 | # Special files 54 | 55 | # Below are the color init strings for the basic file types. A color init 56 | # string consists of one or more of the following numeric codes: 57 | # Attribute codes: 58 | # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed 59 | # Text color codes: 60 | # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white 61 | # Background color codes: 62 | # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white 63 | NORMAL 00;37 # global default 64 | FILE 01;34 # normal file 65 | RESET 00;37 # reset to "normal" color 66 | DIR 00;34 # directory 67 | LINK 00;36 # symbolic link. (If you set this to 'target' instead of a 68 | # numerical value, the color is as for the file pointed to.) 69 | MULTIHARDLINK 00;37 # regular file with more than one link 70 | FIFO 40;33 # pipe 71 | SOCK 00;35 # socket 72 | DOOR 00;35 # door 73 | BLK 40;33;01 # block device driver 74 | CHR 40;33;01 # character device driver 75 | ORPHAN 00;05;37;41 # orphaned syminks 76 | MISSING 00;05;37;41 # ... and the files they point to 77 | SETUID 37;41 # file that is setuid (u+s) 78 | SETGID 30;43 # file that is setgid (g+s) 79 | CAPABILITY 30;41 # file with capability 80 | STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w) 81 | OTHER_WRITABLE 04;34 # dir that is other-writable (o+w) and not sticky 82 | STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable 83 | EXEC 00;32 # This is for files with execute permission: 84 | 85 | # If you use DOS-style suffixes, you may want to uncomment the following: 86 | .cmd 00;33 # executables (bright green) 87 | .exe 00;33 88 | .com 00;33 89 | .btm 00;33 90 | .bat 00;33 91 | 92 | ${data} 93 | -------------------------------------------------------------------------------- /types.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - colour: 01;31 # red 3 | description: archive files 4 | src: types/archive.yaml 5 | - colour: 01;36 # bright red 6 | description: audio formats 7 | src: types/audio.yaml 8 | - colour: 01;30 # bright black 9 | description: Binary files 10 | src: types/binary.yaml 11 | - colour: 00;33 # yellow 12 | description: source code files 13 | src: types/code.yaml 14 | - colour: 00;36 # cyan 15 | description: config files 16 | src: types/config.yaml 17 | - colour: 00;32 # green 18 | description: Data / database 19 | src: types/data.yaml 20 | - colour: 00;32 # green 21 | description: document files 22 | src: types/doc.yaml 23 | - colour: 00;35 # magenta 24 | description: image formats 25 | src: types/image.yaml 26 | - colour: 01;37 # base1 + bold 27 | description: Files of special interest 28 | src: types/other.yaml 29 | - colour: 01;36 # audio + bold 30 | description: video formats 31 | src: types/video.yaml 32 | --------------------------------------------------------------------------------