Skip to content

Latest commit

 

History

History
217 lines (170 loc) · 6.06 KB

File metadata and controls

217 lines (170 loc) · 6.06 KB

Dotfiles

Personal dotfiles for macOS and Linux, managed with just.

What's Included

Tool Description
Fish Primary shell with modular conf.d structure, git abbreviations
Neovim Editor with lazy.nvim, LSP, oil.nvim, fzf-lua, treesitter
Ghostty Terminal with quick-toggle, splits, Poimandres theme
Tmux Multiplexer with Ghostty integration, session persistence

Modern CLI Tools

These dotfiles include configuration for modern CLI replacements (reference):

Tool Replaces Description
bat cat Syntax highlighting, line numbers
fd find Fast file search
rg (ripgrep) grep Fast text search
zoxide cd/autojump Smarter directory jumping
htop top Interactive process viewer
ncdu du Interactive disk usage
tldr man Simplified man pages
delta diff Better git diffs (side-by-side, syntax highlighting)

Quick Start

# Install just (task runner)
brew install just

# Clone the repo
git clone https://github.com/mshick/dotfiles.git ~/.dotfiles
cd ~/.dotfiles

# Full installation (Homebrew, packages, symlinks)
just install

# Or just link configs (if tools already installed)
just link

# Check everything is working
just doctor

Available Commands

just                    # Show all available recipes
just install            # Full installation on new machine
just link               # Symlink all configs to ~
just update             # Update all packages and plugins
just check              # Verify tools are installed
just doctor             # Diagnose common issues
just backup-brew        # Export current brew packages to Brewfile

Directory Structure

dotfiles/
├── config.fish           # Main fish config
├── fish/
│   ├── conf.d/           # Modular fish configuration
│   │   ├── path.fish     # PATH additions (cross-platform)
│   │   ├── env.fish      # Environment variables
│   │   ├── ssh-agent.fish
│   │   └── abbreviations.fish
│   └── functions/        # Fish functions (git aliases, utilities)
├── init.lua              # Neovim config (lazy.nvim)
├── lua/config/           # Neovim modules
├── ghostty/config        # Terminal config
├── starship.toml         # Prompt config
├── .tmux.conf            # Tmux config
├── .gitconfig            # Git config with aliases
├── justfile              # Task runner recipes
└── Brewfile              # Homebrew packages

Customization

Private Configuration

Create ~/.private.fish for machine-specific or sensitive configuration:

# ~/.private.fish - not tracked in git
set -gx GITHUB_TOKEN "your-token"
set -gx WORK_DIR ~/work

See .private.fish.example for a template.

Git Configuration

The .gitconfig includes modern defaults:

  • delta - Side-by-side diffs with syntax highlighting (n/N to navigate)
  • rerere - Remembers conflict resolutions, auto-applies next time
  • branch.sort - Shows most recent branches first
  • column.ui - Nicer column formatting for branch lists

Personal settings (name, email) should go in ~/.gitconfig.local:

# ~/.gitconfig.local
[user]
    name = Your Name
    email = your@email.com

SSH Configuration

Copy .ssh_config.example to ~/.ssh/config and customize:

mkdir -p ~/.ssh/sockets
cp .ssh_config.example ~/.ssh/config
chmod 600 ~/.ssh/config

Adding Packages

Edit Brewfile and run:

just install-packages

Or add packages manually and update the Brewfile:

brew install <package>
just backup-brew

Platform Support

  • macOS: Full support (primary platform)
  • Linux: Supported with automatic path detection

The fish configuration automatically detects the OS and adjusts paths accordingly.

Key Bindings

Fish Shell

  • Ctrl+R - Fuzzy search history (via atuin/fzf)
  • Ctrl+T - Fuzzy find files
  • z <dir> - Smart directory jump (zoxide)
  • bu / buc - Brew upgrade (all packages) / upgrade + cleanup
  • Git abbreviations: gs (status), gc (commit), gp (push), etc.

Neovim

  • Leader: ,
  • <leader>ff - Find files
  • <leader>fg - Live grep
  • <leader>e / - - File explorer (oil.nvim - edit filesystem like a buffer)

Ghostty

  • Cmd+`` - Quick terminal toggle (quake-style dropdown)
  • Cmd+D - Split down
  • Cmd+Shift+D - Split right
  • Cmd+Shift+Arrow - Navigate splits
  • Cmd+Shift+Enter - Zoom split

Tmux

Prefix: Ctrl+a

Navigation

Key Action
Shift+←/→ Previous/next window
Shift+↓ New window
Ctrl+←/→ Swap window left/right
<prefix>h/j/k/l Navigate panes (vim-style)
<prefix>" Split horizontal (same dir)
<prefix>% Split vertical (same dir)
<prefix>c New window (same dir)
<prefix>r Reload config

Copy Mode (<prefix>[)

Key Action
v Start selection
y Yank to clipboard
Y Copy entire line
D Copy to end of line
Ctrl+v Rectangle/block select
/ or ? Search forward/backward
Ctrl+u/d Half-page up/down

Dev Workflows

Key Action
<prefix>C Claude popup (85% screen)
<prefix>g c Dev layout (2x2 grid, YOLO mode)
<prefix>g C Dev layout in new window
<prefix>f fzf file picker from scrollback
<prefix>`` Search backward for ``` (code blocks)

Features:

  • Ghostty passthrough (images, graphics protocols)
  • Title sync (tmux window name → Ghostty tab)
  • Smart status bar with emoji indicators (🤖 AI, ⌨️ editors)
  • Undercurl support (LSP diagnostics in Neovim)
  • Extended keys (Ctrl+Shift combos work)
  • tmux-resurrect/continuum for session persistence

Git Aliases (from .gitconfig)

  • git s - Short status
  • git lg - Pretty log graph
  • git co - Checkout
  • git cm "msg" - Commit with message
  • git undo - Undo last commit