Skip to content
dompuiuPublic

About

My dotfiles settings.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

350 Commits

Folders and files

Repository files navigation

.dotfiles

My terminal setup for macOS, with partial Windows support: zsh, Neovim, terminal emulators, workspace managers, git and a few macOS automation tools. Everything shares the same font (FiraCode Nerd Font) and theme (Tokyo Night).

How it works

The repo mirrors your home folder. Every file in it is symlinked to the same path under $HOME, so editing a config in ~/.config edits the repo:

~/.dotfiles/.config/nvim/init.lua  ->  ~/.config/nvim/init.lua
~/.dotfiles/.zshenv                ->  ~/.zshenv
~/.dotfiles/.config/zsh/.zshenv    ->  ~/.config/zsh/.zshenv

bin/, plugins/ and README.md are not linked.

Install

  1. Install the prerequisites.

  2. Clone the repo to ~/.dotfiles.

  3. Install or update the software:

    ~/.dotfiles/bin/install-software          # macOS / Linux
    ~\.dotfiles\bin\install-software.ps1      # Windows
  4. Link everything:

    ~/.dotfiles/bin/install            # macOS / Linux
    ~\.dotfiles\bin\install.ps1        # Windows
  5. Open a new terminal. On first start zsh installs its plugin manager (zi) and plugins by itself.

  6. Optional: link the herdr/tuios plugins.

New files added to the repo are not linked automatically; run the install script again.

Scripts

  • bin/install - symlinks every repo file into $HOME, creating folders as needed. Safe to re-run: existing links are kept, and real files in the way are skipped and listed. --force runs bin/clean first.
  • bin/install.ps1 - Windows version, same behaviour (-Force runs clean.ps1 first). Also sets XDG_CONFIG_HOME to ~\.config (-SkipXdg to opt out).
  • bin/clean - removes the links install created. See below.
  • bin/clean.ps1 - Windows version of clean. Supports -WhatIf for a dry run.
  • bin/link-plugins - links the plugins in plugins/ into herdr and/or tuios, whichever is installed, and unlinks stale ones (.ps1 for Windows).
  • bin/install-software - installs or upgrades the software the dotfiles need, using Homebrew, with Node, Python and Rust from mise. Runs rtk init -g --opencode to install the RTK OpenCode plugin. --install-only skips upgrades, --dry-run prints the commands, --skip-optional and --skip-skills leave those out, and --with-gui adds the macOS casks.
  • bin/install-software.ps1 - Windows version: winget first, then mise for Node, Python, Rust, herdr, tuios, opencode, tree-sitter and rtk. Removes Node/Python/Rustup/fnm that winget installed so there is one copy. Hand-installs the last resort (PowerShell 7, tuicr), the FiraCode Nerd Font and the npx skills. -InstallOnly, -SkipOptional, -SkipSkills and -SkipFont map to the flags above; -WithWsl runs the Linux script inside WSL.

What clean removes

clean only removes things the dotfiles created:

  • Symlinks in $HOME that point into this repo. Real files are never deleted.
  • Folder symlinks that point into the repo, e.g. ~/.config/opencode -> ~/.dotfiles/.config/opencode. Only the link is removed, never the repo files behind it.
  • Broken symlinks in ~/.config that point into the repo, e.g. links to files deleted from the repo.
  • Folders left empty after removing those links.

Run it before deleting or moving files in the repo, or afterwards to clear the broken links.

What's configured

Shell

  • .zshenv - zsh bootstrap: points ZDOTDIR at ~/.config/zsh and sources the real .zshenv from there (nested shells read it directly).
  • .config/zsh/.zshenv - zsh: XDG folders, EDITOR=nvim, fzf/ripgrep defaults.
  • .config/zsh/.zshrc - zsh: PATH, zi plugins (autosuggestions, syntax highlighting, fzf-tab), zoxide, starship and aliases. Tool init scripts are cached in ~/.cache/zsh and regenerated when the tool is upgraded.
  • .config/personal/env.zsh - zsh: helper functions used by .zshrc (addPath, checkIfCommandExists, ...).
  • .config/starship.toml - starship: prompt.
  • .config/powershell/Microsoft.PowerShell_profile.ps1 - PowerShell 7 profile. Loaded directly on macOS/Linux; on Windows install.ps1 adds a line to $PROFILE that loads it.

Aliases worth knowing: ls → eza, cat → bat, find → fd, cd → zoxide (the originals stay available as realls, realcat and realfind).

New interactive shells record their load time silently. Run zsh-startup to print it for a fresh shell, ZSH_STARTUP_TIME=1 zsh to make a shell print its own time, or check $ZSH_STARTUP_MS for the current shell. PowerShell has the same: pwsh-startup, $env:PWSH_STARTUP_TIME = 1 and $PwshStartupMs.

Machine-specific settings go in ~/.zshenv.local and ~/.zshrc.local. They are loaded when present and are not part of the repo.

Editor

  • .config/nvim - LazyVim: Tokyo Night, gitsigns, markdown preview, ctrl+h/j/k/l window navigation, and <leader>a in visual mode to annotate the selection in Herdr.

Terminals and workspace managers

  • .config/ghostty/config - Ghostty: main terminal. Starts zsh, follows the system light/dark theme.
  • .wezterm.lua - WezTerm: alternative terminal. On Windows it opens WSL (Ubuntu 24.04) by default.
  • .config/herdr - herdr: terminal workspace manager. See Herdr and tuios.
  • .config/plannotator-tui - plannotator-tui: the review window herdr-annotate opens; placement and theme.
  • .config/tuios - tuios: herdr's keys on top of the tuios defaults; runs the plugins unchanged.

Git and CLI tools

  • .gitconfig - git: aliases (git aliases lists them), rebase on pull.
  • .config/git/ignore - git: global ignore file.
  • .config/lazygit/config.yml - lazygit.
  • .config/fd/ignore - fd: global ignore file.
  • .config/ripgrep/ripgreprc - ripgrep: loaded through RIPGREP_CONFIG_PATH.
  • .config/opencode - opencode: settings, TUI settings, a Tokyo Night Moon theme and the opencode-mesh and opencode-quill plugins. RTK is wired up by rtk init -g --opencode, which writes its own plugin file instead of the broken openrtk package.

macOS automation

  • .hammerspoon/init.lua - Hammerspoon: cmd+esc toggles Ghostty and jumps back to the previous app. ctrl+alt+cmd+arrows snaps windows.

Skills

Agent skills I use with opencode (and other agents). They are installed globally into ~/.agents/skills, tracked by ~/.agents/.skill-lock.json, and are not part of this repo.

  • ui-ux-pro-max - UI/UX design intelligence: searchable styles, palettes, font pairings, UX rules and stack-specific guidance. Install with npx ui-ux-pro-max-cli init --ai universal --global (needs Python 3).
  • impeccable - design vocabulary and reviewer for interfaces: critique, audit, polish, bolder, plus a slop detector. Install with npx impeccable install --scope=global.
  • awesome-design-md - DESIGN.md files extracted from real sites; copy one into a project and let the agent follow it.
  • mattpocock/skills - engineering and writing workflows: grilling, specs, implement, TDD, code review, handoff, research. Install with npx skills add mattpocock/skills -g.
  • agent-skills - broad engineering skill set: architecture, debugging, security, performance, docs, shipping. Install with npx skills add addyosmani/agent-skills -g.
  • herdr-annotate - its plannotator-tui skill lets an agent ask me to review a plan or document in Annotate. Install with npx skills add plannotator/herdr-annotate --skill plannotator-tui -g.

Prerequisites

bin/install-software (or bin/install-software.ps1 on Windows) installs and updates everything in this list: Homebrew formulae on macOS/Linux and winget packages on Windows, plus the tools those package managers do not have. Node, Python and Rust come from mise; on Windows so do herdr, tuios, opencode, tree-sitter and rtk. PowerShell 7 comes from its release ZIP on Windows (see Herdr and tuios). GUI apps and the font are macOS casks and are only installed with --with-gui.

WSL: Windows tools on PATH

WSL appends every Windows PATH directory to Linux processes by default. That puts ~30 /mnt/c folders on PATH, and each command lookup — plus zsh's one-time command hash — stats all of them over the 9p filesystem. It costs roughly 60–100 ms per new shell.

If you rarely call Windows binaries from WSL, turn it off globally in /etc/wsl.conf (sudoedit /etc/wsl.conf creates it if it does not exist):

[interop]
appendWindowsPath = false

Then restart WSL from Windows:

wsl --shutdown

Symlink the few Windows commands you still want into ~/.local/bin, which is already on PATH. Symlinks to .exe files work, and VS Code's code wrapper resolves its own location through realpath, so it works through a symlink too:

code_path="/mnt/c/Users/YOUR_WINDOWS_USER/AppData/Local"
code_path="$code_path/Programs/Microsoft VS Code/bin/code"
ln -s /mnt/c/WINDOWS/system32/cmd.exe ~/.local/bin/
ln -s /mnt/c/WINDOWS/system32/wsl.exe ~/.local/bin/
ln -s /mnt/c/WINDOWS/explorer.exe ~/.local/bin/
ln -s "$code_path" ~/.local/bin/code
ln -s "/mnt/c/Program Files/PowerShell/7/pwsh.exe" ~/.local/bin/pwsh.exe

Replace YOUR_WINDOWS_USER with your Windows user name (the folder under /mnt/c/Users). Check them with:

command -v code explorer.exe cmd.exe wsl.exe pwsh.exe

Other Windows tools (Windows yarn, flutter, nvim.exe, ...) need their own symlink; the directories are still visible under /mnt/c. Skip this section entirely if you use Windows binaries regularly — the config works either way, startup is just slower.

Herdr and tuios

  • herdr 0.8.2+ - terminal workspace manager (.config/herdr)
  • tuios - terminal window manager (.config/tuios); runs herdr plugins as they are
  • tuicr - code review TUI for the panes plugin

On Windows, herdr starts panes in PowerShell 7 only when a real pwsh.exe (not the 0-byte App Execution Alias of a Store install) is on PATH. bin/install-software.ps1 installs the official release ZIP into %LOCALAPPDATA%\Programs\PowerShell\7 and adds it to PATH; re-run it to update PowerShell. The MSIX/Store copy is not used - remove it with Get-AppxPackage Microsoft.PowerShell | Remove-AppxPackage, and point the Windows Terminal profile at the ZIP (commandline instead of "source": "Windows.Terminal.PowershellCore"). No [terminal] default_shell in .config/herdr/config.toml, so macOS and Linux keep using $SHELL.

Plugins

Local plugins live in plugins/, outside .config, because both herdr and tuios load them. Link them all so they load straight from the repo:

bin/link-plugins          # macOS / Linux
bin/link-plugins.ps1      # Windows

The script checks which of herdr and tuios is on PATH and skips the missing one. With herdr it runs herdr plugin link for every directory with a herdr-plugin.toml. tuios also reads herdr's plugin list, so with both present it only enables the plugins in tuios; with tuios alone it runs tuios plugins link --enable. It prints <host>: linked <name> or <host>: failed <name> per plugin and is safe to re-run after adding one. It also installs Herdr Annotate and its Links add-on from GitHub when they are missing, and leaves them alone otherwise.

Before linking, it removes plugins that point into this repo but no longer match a folder in plugins/ (renamed, moved or deleted), e.g. the old herdr-sesh links from .config/herdr/plugins. In tuios it turns them off first, then unlinks them from herdr. Plugins from elsewhere, like herdr-tsk, are left alone. Run it from a terminal outside tuios, and again after moving the repo.

  • sesh - workspace picker (open workspaces, saved sessions, zoxide) and previous-workspace jump. Keys: prefix+alt+o, prefix+;. Requires: fzf 0.65+, jq. Optional: zoxide, eza.
  • panes - nvim side pane or tab; tuicr review in a split or tab, and uncommitted-changes review. Keys: prefix+alt+v, prefix+alt+shift+v, prefix+alt+i, prefix+alt+shift+i, prefix+alt+d. Requires: nvim. Optional: tuicr.

Plugin scripts use zsh on macOS/Linux and PowerShell 7 (pwsh) on Windows; jq is not needed on Windows. A Nerd Font is needed for the picker icons.

sesh saved sessions go in $(herdr plugin config-dir sesh)/sessions, one name | path | startup command per line; see plugins/sesh/sessions.example. In tuios the picker labels open sessions tuios and in herdr it labels them herdr.

Herdr Annotate

Herdr Annotate is installed from GitHub, not linked from plugins/. bin/link-plugins installs it when it is missing, picking the Windows Full variant on Windows. It annotates terminal text, reviews documents and agent replies in plannotator-tui, and sends the feedback back to the agent. Requires herdr 0.9.0+. To install it by hand:

herdr plugin install plannotator/herdr-annotate            # macOS / Linux
herdr plugin install plannotator/herdr-annotate/windows-full   # Windows

Keys: prefix+a (comment on the selection), prefix+shift+a (copy all as Markdown), prefix+ctrl+a (copy and archive), prefix+ctrl+v (paste into the agent's prompt), prefix+ctrl+s (send to the agent), prefix+m (manage), prefix+d (folder review), prefix+shift+o (agent's replies), prefix+ctrl+o (newest reply), prefix+t (pane output), prefix+ctrl+d (folder review with Approve). Since Annotate took prefix+a and prefix+shift+a, the agent jumps moved to prefix+alt+n / prefix+alt+shift+n, and open_notification_target to prefix+alt+shift+o.

Optional add-on, routes Ctrl-clicked file://…md links to Annotate: herdr plugin install plannotator/herdr-annotate/links (installed by bin/link-plugins too). Update both with herdr plugin update. Settings live in .config/plannotator-tui (placement, theme); on Windows that file is linked to %APPDATA%\plannotator-tui\config.toml by bin/install.ps1. tuios cannot run it, since it drives herdr's API.

In Neovim, <leader>a in visual mode sends the selection to Annotate (.config/nvim/lua/config/keymaps.lua), since the plugin cannot read a Neovim selection itself.

About

My dotfiles settings.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages