Config explorer

The actual config — not a description of it

Every file below is pulled straight from its source repo at build time and rendered as-is. Pick a layer; read the real thing. Truncated files link to the full source on GitHub.

Authored once, vendored into every repo.

dotfiles-corezsh/20-aliases.zsh
view on GitHub ↗

Modern-CLI aliases (eza, bat, rg, fd…), each guarded by a capability check (HAVE_* flags) so a missing tool never breaks the shell.

# core/zsh/20-aliases.zsh
# ──────────────────────────────────────────────────────────────────────────────
# Aliases for the modern CLI stack. Every alias touching an optional tool is
# GUARDED by a HAVE_* flag from 00-tools.zsh, so on a bare box (fresh server, rescue
# shell) you transparently get the classic command. Load AFTER 00-tools.zsh.
# Anything offensive/engagement-flavoured lives in dotfiles-Kali, not here.
# ──────────────────────────────────────────────────────────────────────────────

# ── ls -> eza ─────────────────────────────────────────────────────────────────
if [[ -n ${HAVE_EZA:-} ]]; then
  alias ls='eza --group-directories-first --icons=auto'
  alias ll='eza -lah --group-directories-first --icons=auto --git'
  alias la='eza -a  --group-directories-first --icons=auto'
  alias lt='eza --tree --level=2 --icons=auto'
  alias llt='eza --tree --level=3 -l --icons=auto'
  alias tree='eza --tree --icons=auto'
  (($+functions[compdef])) && compdef eza=ls # reuse ls completion for eza
else
  alias ll='ls -lah'
  alias la='ls -A'
fi

# ── cat -> bat (resolved name from 00-tools.zsh) ────────────────────────────────
if [[ -n ${HAVE_BAT:-} ]]; then
  alias cat="$BAT_BIN --paging=never"
  alias catp="$BAT_BIN"   # paged, full bat
  # …and `bat` under its CANONICAL name, mirroring the fd line below. Debian/Ubuntu/Kali
  # ship the binary as `batcat`, so without this the tool was installed and fully wired
  # (cat, catp, MANPAGER, the fzf previews) yet untypeable by the name its own README, man
  # page and every upstream recipe use. The two renamed tools were handled asymmetrically —
  # fd got this alias, bat did not — which is also what made core-doctor report `✗ bat` two
  # lines above a `resolved` section naming batcat. Harmless `alias bat=bat` elsewhere: zsh
  # does not re-expand an alias to its own name in command position.
  alias bat="$BAT_BIN"
  export BAT_THEME="ansi" # follow the terminal palette (tokyonight via ghostty)
  export MANPAGER="sh -c 'col -bx | $BAT_BIN -l man -p'"
fi

# ── find -> fd ────────────────────────────────────────────────────────────────
[[ -n ${HAVE_FD:-} ]] && alias fd="$FD_BIN"

# ── grep stays POSIX for scripts; rg is its own command (smart-case default) ──
[[ -n ${HAVE_RG:-} ]] && alias rg='rg --smart-case'

# ── cd -> zoxide (z), interactive jump (zi), `-` to previous dir ─────────────
if [[ -n ${HAVE_ZOXIDE:-} ]]; then
  alias cd='z'
  alias cdi='zi'
fi
alias -- -='cd -'

# ── disk / process / monitor ──────────────────────────────────────────────────
[[ -n ${HAVE_DUST:-} ]]  && alias du='dust'
[[ -n ${HAVE_PROCS:-} ]] && alias ps='procs'
[[ -n ${HAVE_BTOP:-} ]]  && alias top='btop' && alias htop='btop'
[[ -n ${HAVE_VIDDY:-} ]] && alias watch='viddy'
# df → duf (modern, mountpoint-aware); classic `df -h` stays the bare-box fallback.
if [[ -n ${HAVE_DUF:-} ]]; then alias df='duf'; else alias df='df -h'; fi

# ── file manager ──────────────────────────────────────────────────────────────
[[ -n ${HAVE_YAZI:-} ]] && {
  alias fm='yazi'
  alias y='yazi'
}

# ── terminal web browser (w3m preferred; BROWSER_BIN resolved in 00-tools.zsh) ──
# When a browser is present, `web <url>` is defined; with none installed this whole
# block is skipped — no alias, no export (the "no browser" row of the PR's table).
# $BROWSER is claimed only on a headless box (SSH / server / WSL-no-X) so it never
# hijacks GUI-opening tools on a desktop; macOS ($OSTYPE=darwin*) always has a GUI,
# so it's skipped too.
if [[ -n ${HAVE_BROWSER:-} ]]; then
  alias web="$BROWSER_BIN"
  if [[ -z ${DISPLAY:-} && -z ${WAYLAND_DISPLAY:-} && $OSTYPE != darwin* ]]; then
    export BROWSER="$BROWSER_BIN"
  fi
fi

# ── 2026 modern stack additions (all guarded; classics untouched) ────────────
# xh: Rust HTTPie — for poking APIs / web targets. curl stays for scripts.
[[ -n ${HAVE_XH:-} ]] && {
  alias http='xh'
  alias https='xh --https'
}
# glow: render markdown in the terminal (engagement notes, READMEs)
[[ -n ${HAVE_GLOW:-} ]] && alias md='glow --pager'
# doggo: modern dig (DNS recon). dig stays as-is; this is a distinct verb.
[[ -n ${HAVE_DOGGO:-} ]] && alias dns='doggo'
# gron / sd are their own commands (no alias — never shadow sed in scripts).
# jq / yq / jnv / lnav / hyperfine / watchexec / shellcheck / shfmt are likewise their own
# commands: they shadow nothing classic, so they get HAVE_* detection in 00-tools.zsh but
# no alias.
# (jnv is the interactive JSON explorer — you run `jnv file.json` or pipe into it.)
# (lnav is the log reader — `lnav /var/log/...` or a directory; it merges and follows.)
# (watchexec re-runs a command on file changes — `watchexec -e py -- pytest`. NOT aliased
#  to `watch`: 20-aliases.zsh already points `watch` at viddy, and conflating "re-run on a
#  timer" with "re-run on a change" would silently give you the wrong one.)

# ── editor + misc QoL ─────────────────────────────────────────────────────────
alias vim='nvim'
# diff: colourise ONLY when this box's diff actually supports `--color` (GNU does;
# BSD/macOS diff — the dotfiles-MacBook target — and busybox diff on Alpine do NOT,
# where an unconditional alias would make every `diff` invocation error). `--color`
# support is a STABLE property of the box's diff binary, so probing it forks the real
# `diff` on every shell for an answer that never changes. Cache the verdict keyed on the
# binary's mtime (the same invalidation _cache_eval uses): re-probe only when diff is
# newer than the cache — e.g. after a GNU/BSD toolchain change. When the cache dir isn't
# writable the live probe still decides correctly, so correctness never depends on the
# cache. (df → duf/df -h above.)
() {
  emulate -L zsh
  local bin="${commands[diff]}" cache="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/diff-color"
  [[ -z "$bin" ]] && return          # no diff at all → no alias
  if [[ -e "$cache" && ! "$bin" -nt "$cache" ]]; then
    [[ -s "$cache" ]] && alias diff='diff --color=auto'   # fresh cache, zero forks
    return
  fi
  # (re)probe once, then persist the verdict (non-empty = supported) for next start.
  # `>|` forces the write past 10-options.zsh's NO_CLOBBER (loaded before 20-aliases.zsh).
  if diff --color=auto /dev/null /dev/null >/dev/null 2>&1; then
    alias diff='diff --color=auto'
    mkdir -p "${cache:h}" 2>/dev/null && print -rn -- 1 >| "$cache" 2>/dev/null
  else
    mkdir -p "${cache:h}" 2>/dev/null && print -rn -- '' >| "$cache" 2>/dev/null
  fi
}

# ── git ───────────────────────────────────────────────────────────────────────
# The git alias set is the single source of truth in 25-git.zsh (OMZ-style, loaded
# right after this file). Two exceptions live here because they are TOOL-DETECTION
# gated, not git-workflow aliases: the `lg` lazygit launcher and the HAVE_DIFFT-gated
# `gdft` below.
# git-absorb gets NO alias at all — it installs as the `git absorb` subcommand, so git
# already dispatches it and there is nothing to shadow. 00-tools.zsh detects it
# (HAVE_GIT_ABSORB) purely so core-doctor can report it; see git/gitconfig's `fix` alias.
alias lg='lazygit'

# difftastic (difft): AST/structural diff — an OPT-IN companion to delta, never the
# default pager. delta stays the daily syntax-highlighting diff; `gdft [<ref>]` reviews
# a change by *structure*, so formatting-only churn (rewraps, moved elements, trailing

Showing the first 140 of 200 lines — read the full file ↗

dotfiles-corestarship/starship.toml
view on GitHub ↗

The Tokyo Night prompt — symlinked to starship’s default path, so no STARSHIP_CONFIG env is needed.

"$schema" = 'https://starship.rs/config-schema.json'

# command_timeout: the ceiling (ms) starship waits for ANY external command it
# runs to render a segment — the git_* modules (git_status/branch/commit/state)
# and every [custom] command — before it abandons the call AND kills the child.
# starship's built-in default is 500ms; we pin it EXPLICITLY (and a touch higher)
# for two reasons:
#   • Correctness: a `git status` on a big or cold repo can legitimately take
#     >500ms, and the default would blank the git segment mid-work. 1300ms clears
#     that on real repos without feeling laggy.
#   • Reaping: the timeout is also the SAFETY VALVE. When a git call wedges — a
#     stale .git/index.lock, a repo on a slow \\wsl$ / network path, a hung
#     credential probe — starship stops waiting and terminates the child at this
#     bound instead of leaving it running. On Windows especially, an un-reaped
#     git child orphans, and one per prompt render piles up into hundreds of
#     stuck git.exe (enough that scoop/winget then can't replace the in-use
#     git binary to update it). Bounding + killing here is what stops the pile.
# The OS layer complements this: the Windows host also makes shell-spawned git
# fail fast instead of block on an auth prompt (see dotfiles-Windows pwsh core).
command_timeout = 1300

# No blank line above each prompt: the command-block rules (zsh 00-tools.zsh) now
# own block separation, and transient collapse looks tighter without the leading gap.
add_newline = false

# dotfiles-* :: starship prompt  (tokyonight-storm — bold minimal-left revision)
# ──────────────────────────────────────────────────────────────────────────────
# LAYOUT: the LEFT prompt is a single srf1 capsule of always-present context —
# os · user · directory · git — with the ❖ input char on a second line. Languages,
# the ops band (docker/k8s/aws/conda/direnv/jobs) and shell/duration/memory live in
# right_format as a matching srf1 capsule at the far right. $time was dropped (tmux +
# sketchybar own the clock). The whole prompt sits on ONE surface (srf1) — the old
# srf1/srf2 two-tone stepping was flattened for a seamless look; set a module's `bg:`
# back to color_srf2 to restore depth. Colors are TEXT/ICON accents: os→blue ·
# user→purple · dir→yellow · git→green/orange · languages→aqua · ops→purple/orange.
# Transient collapse + command-block rules are wired in zsh (00-tools/45-plugins).)

format = """
[](fg:color_srf1)\
$os\
$username\
$hostname\
$directory\
$git_branch\
$git_commit\
$git_state\
$git_status\
$git_metrics\
[](fg:color_srf1)\
$line_break$status$character$sudo"""

right_format = """
[](fg:color_srf1)\
$c$cpp$rust$golang$nodejs$bun$php$java$kotlin$haskell$python$ruby$lua$package\
$container$docker_context$kubernetes$aws$conda$pixi$direnv$env_var$custom$jobs$shlvl\
$shell$cmd_duration$memory_usage\
[](fg:color_srf1)\
"""

continuation_prompt = "[∙](fg:color_comment)" # the > > on multi-line input

palette = 'tokyonight_storm'

[palettes.tokyonight_storm]
# ── accents — now used as TEXT, not as fills ──────────────────────────────────
color_fg0 = '#c0caf5'     # fg (brightest text)
color_fg_dark = '#a9b1d6' # softer text (quiet segments)
color_blue = '#7aa2f7'
color_aqua = '#7dcfff'    # cyan
color_green = '#9ece6a'
color_orange = '#ff9e64'
color_purple = '#bb9af7'  # magenta
color_red = '#f7768e'
color_yellow = '#e0af68'
color_comment = '#565f89' # muted / de-emphasized
# ── surfaces — the two dark segment fills (subtle stepped depth) ──────────────
color_srf1 = '#24283b' # storm bg, slightly raised above the terminal
color_srf2 = '#1f2335' # bg_dark, a touch deeper

[os]
disabled = false
style = "bg:color_srf1 fg:color_blue"

[os.symbols]
Windows = "󰍲 "
Ubuntu = "󰕈 "
SUSE = ""
Raspbian = "󰐿 "
Mint = "󰣭 "
Macos = "󰀵 "
Manjaro = ""
Linux = "󰌽 "
Gentoo = "󰣨 "
Fedora = "󰣛 "
Alpine = ""
Amazon = ""
Android = ""
AOSC = ""
Arch = "󰣇 "
Artix = "󰣇 "
EndeavourOS = ""
CentOS = ""
Debian = "󰣚 "
Redhat = "󱄛 "
RedHatEnterprise = "󱄛 "
Pop = ""

[username]
show_always = true
style_user = "bg:color_srf1 fg:color_purple"
style_root = "bg:color_srf1 fg:color_red"    # root stands out (kept readable, not a fill)
format = '[$user ]($style)'

# ── Context awareness (bold-refresh additions) ──────────────────────────────────
# hostname: silent locally (ssh_only), ORANGE on a remote box so an SSH session is
#   impossible to miss. Rides the left identity capsule, right after $username.
[hostname]
ssh_only = true
style = "fg:color_orange bg:color_srf1"
format = '[@$hostname ]($style)'

# container: a red hexagon when the shell is INSIDE a container (docker/podman/etc.) —
#   "know your sandbox". Symbol-only for the minimal look; add $name for which-container.
[container]
style = "fg:color_red bg:color_srf1"
format = '[ $symbol ]($style)'

# shlvl: shell-nesting depth, shown only past threshold 3 (normal terminal->tmux->zsh
#   stays silent; ssh->container->shell lights it up). Dim, on the right ops band.
[shlvl]
disabled = false
threshold = 3
symbol = ""
style = "fg:color_comment bg:color_srf1"
format = '[ $symbol$shlvl ]($style)'

[directory]
style = "fg:color_yellow bg:color_srf1"
format = '[ $path ]($style)'
truncation_length = 4

Showing the first 140 of 469 lines — read the full file ↗

dotfiles-coretmux/tmux.reset.conf
view on GitHub ↗

The keybinding layer (prefix C-a lives here), sourced first by tmux.conf so the bindings are the single source of truth.

# core/tmux/tmux.reset.conf  → symlinked to ~/.config/tmux/tmux.reset.conf
# ──────────────────────────────────────────────────────────────────────────────
# THE KEYBINDING LAYER. Sourced FIRST by tmux.conf (before settings/theme/plugins).
# Splitting keys out of tmux.conf — an idea borrowed from omerxx's dotfiles — keeps
# the main file about *configuration* and this file about *muscle memory*. It also
# makes it trivial to wipe every default and start clean if you ever want to.
#
# NOTE: window MOVEMENT across nvim<->tmux (C-h/j/k/l) is owned by
# vim-tmux-navigator (plugin, set in tmux.conf) and is intentionally NOT here.
# These are the PREFIX-table bindings.
# ──────────────────────────────────────────────────────────────────────────────

# Uncomment to start from a completely blank slate (then everything below is your
# entire keymap). Left commented so tmux's sensible defaults remain as a fallback.
# unbind-key -a

# ── Prefix: C-a (screen-style; frees C-b) ─────────────────────────────────────
set -g prefix C-a
unbind C-b
bind C-a send-prefix
bind C-a last-window          # double-tap prefix → toggle last window

# ── Reload ────────────────────────────────────────────────────────────────────
unbind r
bind r source-file ~/.config/tmux/tmux.conf \; display-message "󰑓 tmux.conf reloaded"

# ── Panes: vim-style selection (prefix h/j/k/l) ───────────────────────────────
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

# ── Panes: splits keep the current path ───────────────────────────────────────
unbind '"'
unbind %
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind '\' split-window -fh -c "#{pane_current_path}"   # full-height vertical split
bind _ split-window -fv -c "#{pane_current_path}"     # full-width horizontal split

# ── Panes: resize (repeatable -r, so you can hold the key) ────────────────────
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
bind -r m resize-pane -Z                              # (m)aximize / zoom toggle

bind x kill-pane                                      # no confirm prompt
bind X swap-pane -D                                   # rotate current pane down
bind P set pane-border-status                         # toggle per-pane titles
bind * setw synchronize-panes                         # type into all panes at once

# (F)loating pane — tmux 3.7+ feature. `*` is the upstream default but we use it
# for synchronize-panes above, so floating panes get their own key. Guarded by a
# capability probe (list-commands exits non-zero when new-pane is absent) so this
# stays portable to the older tmux versions on other Core machines.
if -b 'tmux list-commands new-pane >/dev/null 2>&1' \
   'bind F new-pane -c "#{pane_current_path}"'

# ── Windows ───────────────────────────────────────────────────────────────────
bind c new-window -c "#{pane_current_path}"
bind -n M-H previous-window                           # Alt+H / Alt+L cycle windows
bind -n M-L next-window
bind -n S-Left  previous-window                       # Shift-arrows too
bind -n S-Right next-window
bind , command-prompt -I "#W" "rename-window '%%'"
bind & kill-window

# ── Pane navigation by Alt+arrow (no prefix) ──────────────────────────────────
bind -n M-Left  select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up    select-pane -U
bind -n M-Down  select-pane -D

# ── Copy-mode (vi). Yank pipes through Core's cross-OS `clip`. ────────────────
set-window-option -g mode-keys vi
bind Enter copy-mode
bind -T copy-mode-vi v     send -X begin-selection
bind -T copy-mode-vi C-v   send -X rectangle-toggle
bind -T copy-mode-vi y     send -X copy-pipe-and-cancel "clip"
bind -T copy-mode-vi Escape send -X cancel
unbind -T copy-mode-vi MouseDragEnd1Pane              # keep selection after drag

# Jump between shell prompts (OSC 133 semantic marks, emitted by zsh/00-tools.zsh).
# tmux has parsed these since 3.4, so no capability probe is needed — the fleet floor is
# 3.6a, and these are copy-mode commands reached via `send -X`, which the list-commands
# probe above could not test for anyway. `[` / `]` are unbound in copy-mode-vi (tmux's
# own `[` lives in the PREFIX table, untouched); `{` / `}` are deliberately NOT taken —
# those are vi previous/next-paragraph.
bind -T copy-mode-vi '[' send -X previous-prompt
bind -T copy-mode-vi ']' send -X next-prompt

# ── Quality of life ───────────────────────────────────────────────────────────
bind R refresh-client
bind S choose-session
bind d detach