name: terminal description: Context and rules for any task involving kitty, zsh, or starship — fonts, prompt layout, color generation, plugins, and config file relationships argument-hint: [task description] allowed-tools: Bash, Read, Glob, Grep, Edit, Write
Terminal Setup
Load this before any task touching kitty config, zsh config, starship prompt, or terminal color theming.
Kitty
Config: ~/.config/kitty/kitty.conf
| Setting | Value |
|---|---|
| Font | JetBrainsMono Nerd Font |
| Font size | 10.0 |
| Window padding | 8px vertical, 20px horizontal |
| Remote control | Enabled (allow_remote_control yes) |
| Remote socket | unix:/tmp/kitty-{kitty_pid} |
| Close confirmation | Disabled (confirm_os_window_close 0) |
| Color include | ~/.config/kitty/colors.conf |
Color generation
colors.conf is auto-generated by matugen — never edit it directly. Edit the template at ~/.config/matugen/templates/kitty-colors instead. It is regenerated on every theme switch via theme-switch.
Colors cover: foreground, background, cursor, selection, URL, tab bar, and the 16 terminal palette colors (color0–color15). The palette maps Material Design 3 tokens:
| Terminal color | Material token |
|---|---|
| color0 | surface |
| color1 | error |
| color2 | tertiary |
| color3 | on_tertiary_container |
| color4 | primary |
| color5 | secondary |
| color6 | tertiary_fixed |
| color7 | on_surface |
| color8 | outline |
| color9–15 | (repeat bright variants of above) |
Zsh
Config: ~/.zshrc
Key settings
| Setting | Value |
|---|---|
| vi mode | Enabled (bindkey -v) |
| Key timeout | 1ms (KEYTIMEOUT=1) |
| History file | ~/.zsh_history |
| History size | 10,000 (memory + disk) |
| History dedup | HIST_IGNORE_DUPS |
| History sharing | SHARE_HISTORY (shared across sessions) |
| Space suppression | HIST_IGNORE_SPACE (commands prefixed with space not saved) |
Vi mode fixes
Backspace and common kill bindings are explicitly rebound to work correctly in vi insert mode:
^? → backward-delete-char
^H → backward-delete-char
^W → backward-kill-word
^U → backward-kill-line
Plugins
| Plugin | Source | Purpose |
|---|---|---|
| zsh-autosuggestions | /usr/share/zsh/plugins/zsh-autosuggestions/ |
Fish-style inline suggestions |
| zsh-syntax-highlighting | /usr/share/zsh/plugins/zsh-syntax-highlighting/ |
Live command syntax coloring |
| fzf key bindings | /usr/share/fzf/key-bindings.zsh |
Ctrl+R history search, Ctrl+T file search, Alt+C cd |
| fzf completion | /usr/share/fzf/completion.zsh |
fzf-powered tab completion |
Syntax highlight style overrides: commands, builtins, and aliases are colored magenta.
Custom functions
asp — AWS profile switcher:
asp() { local p=$(aws configure list-profiles | fzf) && [ -n "$p" ] && export AWS_PROFILE=$p }
Opens an fzf picker of all configured AWS profiles and exports the selection as AWS_PROFILE. The starship prompt reflects the change immediately.
Completion
Menu-style completion with zstyle ':completion:*' menu select. List colors inherit from LS_COLORS, selection highlight uses 48;2;61;50;49 (a dark surface tone matching the current theme).
Prompt
Starship is initialized at the end of .zshrc:
eval "$(starship init zsh)"
Starship
Live config: ~/.config/starship.toml
Source template: ~/.config/matugen/templates/starship-colors
Critical:
starship.tomlis auto-generated by matugen on every theme switch. Never editstarship.tomldirectly. Always edit the template. After editing the template, either run a theme switch or manually substitute{{colors.outline.default.hex}}with the current outline color and write tostarship.toml.
The current outline color comes from color8 in ~/.config/kitty/colors.conf.
Prompt layout
Single-line prompt — no $line_break, all modules on one line:
[left modules: directory, git branch, language contexts...] [right: AWS profile]
Left side uses a custom format string. Right side uses right_format (zsh RPROMPT):
right_format = '$aws'
Left format modules (in order)
$username $hostname $directory
$git_branch $git_commit $git_state $git_metrics
$docker_context $package
$c $cmake $dart $deno $dotnet $elixir $elm $erlang $fennel $fortran $golang $gradle
$haskell $haxe $java $julia $kotlin $lua $nim $nodejs $ocaml $perl $php $python
$rlang $ruby $rust $scala $swift $zig $buf $bun
$nix_shell $conda $meson $memory_usage
$cmd_duration
$jobs $status $character
AWS module
Displayed on the right via right_format. Behavior:
| AWS profile | Display |
|---|---|
default |
Nothing (profile alias maps to "") |
| Any other profile | Profile alias string (includes region) |
No icon — symbol = "".
Style color is dynamically set from the matugen outline token: bold {{colors.outline.default.hex}}.
Profile aliases (region is embedded in alias string, not pulled from $region):
[aws.profile_aliases]
default = ""
work-dev = "work-dev (us-east-1)"
work-staging = "work-staging (us-east-1)"
work-prod = "work-prod (us-east-1)"
Icons / Nerd Font symbols
All module symbols use Nerd Fonts v3 codepoints (ttf-jetbrains-mono-nerd v3.4.0). The template has the correct unicode codepoints baked in. Most symbols that appear as spaces in plain-text editors are valid Nerd Font private-use-area characters — do not treat them as missing.
git_status is disabled.
Color theming
Only the AWS module style color is themed via matugen ({{colors.outline.default.hex}}). All other module styles use hardcoded values (bold purple, etc.).
Key File Paths
| File | Purpose | Editable? |
|---|---|---|
~/.config/kitty/kitty.conf |
Kitty settings | Yes |
~/.config/kitty/colors.conf |
Terminal palette | No — matugen generated |
~/.config/matugen/templates/kitty-colors |
Source for colors.conf | Yes |
~/.zshrc |
Zsh config | Yes |
~/.config/starship.toml |
Live starship config | No — matugen generated |
~/.config/matugen/templates/starship-colors |
Source for starship.toml | Yes |
Rules
- Never edit
starship.tomlorcolors.confdirectly — changes will be overwritten on next theme switch - Always edit matugen templates for persistent changes to prompt colors or starship config structure
- After editing the starship template, restore the live file by substituting
{{colors.outline.default.hex}}with the value ofcolor8fromcolors.conf - Nerd Font symbols in the starship template must be the actual unicode codepoints — use
starship preset nerd-font-symbolsto get correct values, then apply with a Python script (editors and linters tend to strip PUA characters) - The
aspfunction requiresfzfand the AWS CLI to be available