/colormkdir

macOS command to create color folder

Primary LanguageShellMIT LicenseMIT

colormkdir logo

Table of Contents

colormkdir

colormkdir is a CLI for macOS to customize folder color. It can make directory in specified color. Also, it can manage color list by editing json file.

Demo

demo.gif

Installation

Supported platforms

  • macOS

Use Homebrew

brew install mimomimoto/tap/colormkdir

colormkdir use python3 and you need to install some libraries.

pip install pyobjc pillow glob2

Manual Installation

  1. git clone this repository.
  2. Write PATH to ~/.zshrc.
  3. Change colormkdir permission by using chmod.
  4. run source ~/.zshrc.
  5. pip install pyobjc pillow glob2

colormkdir use your global python environment. If you don't want to install these libraries in your global environment, you should edit colormkdir.sh (line 64).

Usage

Create color list

Color list is managed by JSON file. (If you use Homebrew, the file path is '/opt/homebrew/Cellar/colormkdir/0.0.1/libexec/color_list.json' in my case) You need to decide color name and color code as shown below. (It is a default definition)

{
    "r":"#ff0000",
    "b":"#1e90ff",
    "g":"#3cb371",
    "y":"#ffff00",
    "p":"#9400d3",
    "o":"#ff7f50"
}

Update color list

After change color list, you need to run command for updating color list.

colormkdir -u

Make directory in specified color

colormkdir -m [value] <directory name>

[value] is color name defined in color list. If directory name is already exsisted, it will be error.

Change directory color as specified color

colormkdir -c [value] <directory name>

[value] is color name defined in color list. If directory name is not exsisted, it will be error.

Help command

colormkdir -h