termtint-0.1.1 is not a library.
termtint
Terminal color theming based on directory - colorizes iTerm2 tabs and backgrounds based on .termtint config files.
Installation
Or build from source:
Add to your .zshrc:
Usage
Create a .termtint file in any directory. When you cd into that directory (or any subdirectory), terminal colors will automatically change.
Config Formats
Hex color (simplest):
#ff5500
Colors can be specified in multiple formats:
- 6-digit hex:
#ff5500orff5500 - 3-digit hex:
#f50 - RGB:
rgb(255, 85, 0) - HSL:
hsl(20, 100%, 50%) - Named colors:
red,tomato,dodgerblue, etc.
TOML (more control):
= "#00ff00"
= "#001100" # optional, defaults to 15% of tab color
Auto (deterministic hash-based color):
auto
Commands
How It Works
- Shell hook calls
termtint applyon every directory change applysearches up from current directory for.termtint- If found, parses config and emits iTerm2 escape sequences
- State is tracked in
~/.cache/termtint/to avoid redundant updates