# tint A small wrapper around [Tinty](https://github.com/tinted-theming/tinty) that manages light/dark theme pairs and applies the selected theme to Ghostty, Zed, Herdr, OMP, and Conjure. ## Requirements This setup targets macOS and requires: - [Homebrew](https://brew.sh/) - Go 1.26 or newer - Tinty 0.34 or newer - [`dark-notify`](https://github.com/cormacrelf/dark-notify) for automatic switching when macOS changes appearance - `make` from the Xcode Command Line Tools Install the required tools: ```sh xcode-select --install brew tap tinted-theming/tinted brew install tinty go brew install cormacrelf/tap/dark-notify ``` Ghostty, Zed, Herdr, OMP, and Conjure are optional consumers. Install only the applications you use. ## Install From this directory, run: ```sh make install ``` The installer: - Builds `~/.local/bin/tint`. - Installs `config.toml` under `$XDG_CONFIG_HOME/tinted-theming/tinty`, or `~/.config/tinted-theming/tinty` when `XDG_CONFIG_HOME` is unset. - Copies the versioned `default-state.toml` to the installed `state.toml` only when no state file already exists. - Creates `~/.config/herdr/config.toml` if needed. - Runs `tinty sync` to download the configured theme repositories. - Installs bundled custom schemes into Tinty's data directory. - Creates and loads a `dark-notify` LaunchAgent for automatic macOS appearance switching. Add the binary directory to your shell path: ```sh echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc source ~/.zshrc ``` Verify the installation: ```sh which tint tinty --version tint ``` ## Automatic light/dark switching `make install` creates and loads `~/Library/LaunchAgents/dev.tinty.dark-notify.plist`. The agent starts at login, restarts if it exits, and invokes `tint light` or `tint dark` whenever macOS changes appearance. Confirm that the agent is running: ```sh launchctl print "gui/$(id -u)/dev.tinty.dark-notify" ``` Inspect its output if an application does not update: ```sh tail -f ~/Library/Logs/dark-notify.log ``` ## Application setup ### Ghostty The Tinty hook writes: ```text ~/.config/ghostty/themes/tinted-theming ``` Select it in the Ghostty configuration: ```text theme = tinted-theming ``` The hook sends `SIGUSR2` to reload Ghostty after applying a theme. ### Zed The wrapper writes: ```text ~/.config/zed/themes/tinty-current.json ``` After applying the first theme, select `Tinty Current` in Zed. ### Herdr The wrapper maintains a generated `[theme.custom]` block in: ```text ~/.config/herdr/config.toml ``` When the `herdr` executable is available, the wrapper also runs `herdr server reload-config`. ### OMP The wrapper writes: ```text ~/.omp/agent/themes/tinty-current.json ``` Configure OMP to use `tinty-current` where required. ### Conjure The `apply-apps` flow writes `$XDG_CONFIG_HOME/conjure/theme.json`, falling back to `~/.config/conjure/theme.json` when `XDG_CONFIG_HOME` is unset, empty, or relative. The generated JSON contains the selected scheme's `variant` (`light` or `dark`) and seven opaque colors: `background`, `text`, `secondaryText`, `accent`, `glow`, `keyBackground`, and `error`, using Tinty semantic UI colors with Base16/Base24 or tinted8 palette fallbacks. Conjure uses the variant to match its native window appearance to the palette without an additional user setting. Opt in by adding this to `conjure/config.toml` in the same configuration directory: ```toml theme = "tint" ``` The wrapper never changes `config.toml`. Optional entries in its `[colors]` table override generated colors. Only the machine-generated `theme.json` uses JSON; edit the TOML configuration instead. Conjure watches both files and applies changes live, including automatic macOS light/dark switches, without restarting or discarding active tool state. The wrapper does not need to signal or restart Conjure. ## Usage Show the current pair and available commands: ```sh tint ``` Select a named pair: ```sh tint swamp ``` Apply one side of the current pair: ```sh tint light tint dark ``` Set both sides: ```sh tint light:base16-swamp-light dark:base16-swamp-dark ``` Save and favorite a named pair: ```sh tint pair swamp dark:base16-swamp-dark light:base16-swamp-light tint favorite swamp ``` Force appearance selection for scripts or troubleshooting: ```sh TINTY_PAIR_APPEARANCE=light tint swamp TINTY_PAIR_APPEARANCE=dark tint swamp ``` ### Pumpkin The bundled [`base16-pumpkin`](schemes/base16/pumpkin.yaml) and [`base16-pumpkin-light`](schemes/base16/pumpkin-light.yaml) palettes come from the sibling Terebi project. Dark Pumpkin uses brown, cream and vivid autumn accents; Pumpkin Light uses parchment, brown ink and deeper orange, persimmon, toasted amber, caramel and olive accents. Its ANSI cyan slot uses caramel so inverted terminal bars stay warm rather than olive. All light text/accent slots exceed 4.5:1 contrast against the background. `make install` installs both palettes automatically. To install the palettes and updated wrapper without syncing repositories or reloading the appearance agent, then save and select their named pair: ```sh make install-schemes go build -o "$HOME/.local/bin/tint" . tint pair pumpkin dark:base16-pumpkin light:base16-pumpkin-light tint favorite pumpkin tint pumpkin ``` `tint pumpkin` sets both sides and applies the side matching macOS appearance. Use `tint light` or `tint dark` to apply a saved side immediately. Saving/favoriting the pair without selecting it leaves the current pair and active theme unchanged. Tinty stores both YAML files under `$(tinty config --data-dir-path)/custom-schemes/base16/` and builds the installed app templates when applying either theme. Both theme validation and app palette lookup support [Tinty's native custom schemes](https://github.com/tinted-theming/tinty/blob/v0.34.0/USAGE.md#use-your-own-schemes), so Ghostty, Zed, Herdr, OMP and Conjure use the normal application flow. List local palettes with `tinty list --custom-schemes`. Reinstalling updates the bundled palettes without changing saved state; fresh installs include the favorite `pumpkin` pair, and uninstalling removes both bundled YAML files. ## Update After changing or updating the wrapper source: ```sh make install ``` Existing `state.toml` content is preserved. Missing state is recreated from `default-state.toml`, including the bundled named pairs and favorites. The source directory's ignored `state.toml` is personal state and is not used by the installer. ## Uninstall ```sh make uninstall ``` This unloads and removes the LaunchAgent, log, and `tint` binary. It also removes configuration, state, and the empty Herdr configuration only when they were originally created by `make install`; pre-existing user files are preserved. Tinty itself and its shared data remain installed. ## Licensed under GPL-3.0 In plain terms: - Anyone may use, copy, modify, and sell the software. - Distributed copies must remain GPL-3.0. - Modified versions must clearly say they were changed. - Distributing binaries requires providing the corresponding source code. - Recipients receive the same rights to modify and redistribute. - Distributors cannot add restrictions that contradict the GPL. - Patent rights cannot be used to make the software effectively proprietary. - Hardware distributors cannot prevent users from installing modified versions. - The software comes without warranty or liability. - Private use and private modifications impose no publication requirement. - Merely using the software over a network does not require publishing changes; that requirement belongs to the AGPL. For details, see the actual [LICENSE](LICENSE).