Skip to content

tabsp/dotfiles

Repository files navigation

dotfiles

中文

dotman is a tiny Rust-based dotfiles deployer for my personal macOS/Linux environment. It uses a Dotbot-like ordered YAML config to link files, create directories, and run setup commands.

Preview

Terminal setup preview

Prerequisites

  • Rust toolchain with Cargo
  • GNU Make
  • Git
  • curl
  • fish shell

Usage

Build the deployer:

make build

Preview the deployment:

make deploy DRY_RUN=1

Deploy dotfiles:

make deploy

Preview bootstrap steps:

make bootstrap DRY_RUN=1

Run bootstrap steps:

make bootstrap

Skip shell commands such as plugin sync:

make deploy EXCEPT=shell

Run only link steps:

make deploy ONLY=link

Tools

Tool Purpose
fish Shell with built-in autosuggestions
starship Cross-shell prompt
direnv Per-directory environment variables
mise Runtime and tool version manager
fzf Fuzzy finder (files, history, zoxide jump)
zoxide Smarter cd with directory ranking
fd Fast find replacement
ripgrep Fast grep replacement
eza Modern ls replacement with icons
bat cat with syntax highlighting
tealdeer Fast tldr client
btop Resource monitor
fastfetch System info display
dua-cli Disk usage analyzer
neovim Editor
lazygit Terminal Git UI
yazi Terminal file manager
tmux Terminal multiplexer with Catppuccin theme
ghostty GPU-accelerated terminal with Catppuccin Mocha theme
jq + yq JSON/YAML CLI processors
ruby Runtime for try experiment manager

All packages are installed via brew bundle --file packages/Brewfile during bootstrap. Fish integrates most tools on startup and defines custom functions: zi (fzf+zoxide jump), ff (fzf file picker), y (yazi with auto-cd), t (tmux attach/create). See config/fish/config.fish.

Layout

  • bin/: user scripts linked into ~/.local/bin (tmux-status, etc.)
  • config/: tracked dotfiles for fish, nvim, ghostty, btop, fastfetch, starship, tealdeer, tmux, git
  • docs/: setup notes and manual checklists
  • dotman.yaml: deploy steps (link configs, run shell commands)
  • dotman.bootstrap.yaml: bootstrap steps (install packages, fonts)
  • packages/: Brewfile and platform-specific install helpers
  • src/: Rust deployer source
  • tests/: CLI integration tests

Configuration

Deployment steps live in dotman.yaml. Bootstrap steps live in dotman.bootstrap.yaml.

Supported directives:

  • defaults
  • link
  • create
  • shell
  • clean: planned / dry-run placeholder

Example:

- defaults:
    link:
      create: true
      relink: true
      relative: true
    shell:
      stdout: true
      stderr: true

- link:
    ~/.config/fish: config/fish
    ~/.config/nvim: config/nvim

- create:
    - ~/.config/fish/local.d

- shell:
    - command: fish -lc 'type -q fisher; or curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source; and fisher update'
      description: Install and sync fish plugins

Field reference:

  • defaults.link.create: create missing parent directories for link targets.
  • defaults.link.relink: replace an existing symlink when it points somewhere else.
  • defaults.link.backup: move an existing conflicting target aside before linking.
  • defaults.link.relative: create relative symlinks.
  • defaults.shell.stdout: inherit stdout from shell commands.
  • defaults.shell.stderr: inherit stderr from shell commands.
  • link: maps target paths to source paths. A link item can also use path plus per-item create, relink, backup, relative, and if overrides.
  • create: creates directories, following existing symlinked path components.
  • shell.command: command to run through sh -c.
  • shell.description: human-readable label shown in logs.
  • shell.if: shell condition that must succeed before the command runs.
  • shell.stdout / shell.stderr: per-command output overrides.
  • clean: parsed and shown in dry-runs, but non-dry-run cleanup is not implemented yet.

Local Overrides

Machine-specific paths, tokens, and temporary tool setup should stay out of the shared repository.

Fish loads local-only files from:

~/.config/fish/local.d/*.fish

For first-time setup on a new machine, follow docs/new-machine.md.

Development

make lint
make test
make ci

About

Personal dotfiles managed by dotman.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors