The shell (hearth)
hearth is the cozy terminal room. It sets up the whole command-line experience — the terminal emulator, the multiplexer, the shell, the prompt, the file manager, the editor, and a toolbelt of modern CLI replacements — every one of them painted in nebelung colours.
The stack
Section titled “The stack”| Layer | Tool | Notes |
|---|---|---|
| Terminal | Ghostty | font size 19, title bar hidden, auto-attaches to zellij |
| Multiplexer | zellij | custom tab bar + status bar, grid/spiral/columns layouts |
| Shell | zsh | framework-free, fzf-tab, sensible history, declarative Git aliases |
| Prompt | starship | nebelung-tinted |
| File manager | yazi | markdown & code previews, image previews via chafa |
| Editor | helix | the default $EDITOR, nebelung theme |
| Jumper | zoxide | frecency cd, cdi for an fzf picker |
Plus a themed toolbelt: bat (aliased over cat), lsd (over ls), lazygit
(lg), claude (c), delta for git diffs, fzf, fd, jq, gh, glow,
fastfetch, and nix-index + comma so you can run any nixpkgs command on
demand.
Git aliases
Section titled “Git aliases”Hearth uses plain zsh—no shell framework—and supplies a finite set of Git
shortcuts directly. The names follow the broadly used Oh My Zsh-style
vocabulary where conventions agree, while deliberately avoiding ambiguous
shortcuts such as gl, gr, and gs, whose meanings differ between popular
alias sets.
| Area | Aliases |
|---|---|
| Add | ga, gaa, gapa |
| Branch / checkout / clone | gb, gba, gbd, gbD, gbm, gco, gcb, gcl, gsw, gswc |
| Commit / cherry-pick | gc, gca, gcam, gcmsg, gcn, gcp, gcpa, gcpc |
| Diff / log | gd, gds, gdw, glo, glog, gloga |
| Fetch / merge | gf, gfa, gfo, gm, gma, gmc, gmff |
| Pull / push | gpl, gpr, gp, gpf, gpsup |
| Rebase / repository | grb, grba, grbc, grbi, grbs, grt, grv |
| Status / stash | gst, gss, gsb, gsta, gstl, gstp, gsts |
| Tag / worktree | gt, gwt, gwta, gwtl, gwtr |
g itself is git. Add, replace, or remove shortcuts per host with
nebelhaus.git.shellAliases:
nebelhaus.git.shellAliases = { gst = "git status --short --branch"; # replace gsync = "git pull --rebase --autostash"; # add gco = null; # remove};Ghostty opens into zellij
Section titled “Ghostty opens into zellij”Launching Ghostty drops you straight into a persistent zellij session called
main. New panes and tabs inherit your working directory. A few conveniences:
- Ghostty’s
⌘T,⌘P,⌘Y,⌘Cand friends are unbound on purpose — zellij owns those, so the same keys work whether or not you’re multiplexed. Ctrl-Tab/Ctrl-Shift-Tabwalk your tabs in most-recently-used order, browser-style — one tap bounces between your two hottest tabs; keep tapping to go further back. (Ghostty forwards the kitty-protocol encoding so zellij sees them.)
zellij keybindings
Section titled “zellij keybindings”| Keys | Action |
|---|---|
Super P | New pane, inheriting cwd — but a shell born inside a claude --worktree checkout hops to the repo’s main checkout |
Super ⇧P | New pane, stay here — inherits cwd with no hop, so you get a shell right inside the worktree |
Super T | New tab at $HOME — born named ~ (fresh tabs are never Tab #N) |
Super ⇧T | New tab at the focused pane’s directory — with the same worktree hop as Super P |
Super F | Fullscreen the focused pane — zoom it to fill the tab, tap again to drop back into the tiled layout |
Super R | Reload the terminal stack — gracefully quit/reopen Ghostty, then start a fresh zellij server with the same tabs, panes and working directories; live Claude Code panes resume their exact conversations |
Super Y | yazi peek — a floating browser with live previews; Enter on a directory opens a new tab there |
Super ⇧Y | yazi jump — browse, then drop a shell in the landing directory |
Ctrl Tab / Ctrl ⇧Tab | Tab history back / forward (most-recently-used) |
Alt < / Alt > | Cycle swap layouts (grid → spiral → columns) |
The reload is also available as zreload from a shell. It prepares the recovery
layout inside zellij, then hands the quit/delete/reopen sequence to a launchd
agent outside the terminal, so killing the old server cannot strand its own
script. This is a real Ghostty quit and relaunch, not reload_config: that action
only reparses Ghostty settings and would leave the old launcher process alive.
Each zellij server generation keeps an explicit pane-to-Claude-session manifest,
so a foreground tool such as sourcekit-lsp cannot be mistaken for the pane
that launched it. If any active command pane cannot be proven resumable, reload
stops before quitting Ghostty or deleting the session.
Layouts
Section titled “Layouts”zellij ships three swap layouts, cycled with Alt < / Alt >:
- Grid (default) — the most balanced square arrangement, every pane equal area.
- Spiral — balanced 50/50 nesting, largest pane top-left.
- Columns — equal full-height columns side by side.
yazi previews
Section titled “yazi previews”yazi is set up for fast previewing: markdown renders through glow, code through
bat (syntax-highlighted), and images through chafa near-fullscreen inside
zellij. Press Y to copy a file’s contents (not just its path), and Esc to
close a floating peek. In the Super Y peek overlay, Enter on a file pages
it fullscreen while Enter on a directory opens a new zellij tab there (use
l / → to descend into a directory without leaving peek) — so peek doubles as
the browse-and-pick “new tab” chooser.
Choosing your editor
Section titled “Choosing your editor”helix is the default. nebelhaus.hearth.editor is the one editor the rice
uses everywhere — it’s your $EDITOR / $VISUAL, and it’s what every “open in
an editor” action launches (the “Nix Config” palette command, the bar’s nix-open
item, and the file-association hijack below). Those open the target in a new
zellij tab running it, so a terminal editor is the natural fit; a GUI editor’s
CLI works too. Set it in your host file:
nebelhaus.hearth.editor = "nvim"; # any terminal editor# a GUI editor's CLI works too, e.g. "code" or "code -w" to blockOne related knob:
nebelhaus.hearth.hijackFileAssociations— off by default; whentrue, makes your editor the default opener for.json,.md,.ts,.nix, and similar viaduti.
Handy shell touches
Section titled “Handy shell touches”- zoxide —
cdlearns your habits;cdiopens an fuzzy picker of your frequent directories. - Git aliases — a compact, framework-independent set (
g,gst,gco,gcb,gp,gpf,grbi,gwt, …) ships built in — no oh-my-zsh. Add, override, or remove one withnebelhaus.git.shellAliases. - Auto-renaming tabs —
cdinto a repo and the zellij tab renames itself after it;cd ~renames it back to~, the name every fresh tab is born with (noTab #Nanywhere). - Claude Code aware — new shells opened (
Super P/Super ⇧T) inside a~/.cache/claude-worktreescheckout hop to the parent repo automatically — and theSuper ⇧Ttab is named after the main repo, not the throwaway worktree. Want a shell inside the worktree instead?Super ⇧Pis the no-hop escape hatch.
See Theming & accents for how every tool above gets its colours, and the options reference for every hearth knob.