Skip to content

kbrdn1/dotfiles

Repository files navigation

Dotfiles

Welcome to my dotfiles repository! This repository is managed using chezmoi, a tool designed to manage your dotfiles across multiple machines.

Preview

Table of Contents 📚

CLI Tools 🛠

Command-line tools are installed declaratively via Nix + Home Manager (see nix-config/home.nix). Homebrew is kept only for GUI casks and a few system/exclusive packages. This replaces the previous ASDF + Homebrew setup (see MIGRATION_NIX.md).

GUI Tools 🖥

Essential graphical tools:

Applications 📦

Key applications:

  • Development

    • Ghostty + herdr: Primary dev environment — GPU-accelerated terminal + workspace/agent manager
    • Zed: Secondary IDE
    • Neovim: Terminal editor
    • OrbStack: Docker / Linux VM alternative
    • Postman: API platform
  • Browsers & Communication

  • Productivity

SetApp Applications 📦

Premium applications via SetApp:

Aliases & Functions 🔧

Aliases and functions are defined in nix-config/home.nix (programs.zsh.shellAliases / initExtra), not in a standalone .zshrc.

System Aliases

Alias Command Description
x exit Exit terminal
config cd $XDG_CONFIG_HOME Navigate to config directory
edit-config $EDITOR $XDG_CONFIG_HOME Edit config directory
reload-zsh source ~/.zshrc Reload ZSH configuration

Nix Aliases

Alias Command Description
reload-nix home-manager switch --flake ~/nix-config Apply the Home Manager config
edit-nix $EDITOR ~/nix-config/home.nix Edit home.nix
edit-flake $EDITOR ~/nix-config/flake.nix Edit flake.nix

Development Aliases

Alias Command Description
py python3 Python 3 (Nix)
python /usr/bin/python3 System Python 3
pa, laravel php artisan Laravel Artisan CLI
a, adonis node ace AdonisJS Ace CLI
ls eza --color=always --long --git --no-filesize --icons=always --no-time --no-user --no-permissions --group-directories-first Enhanced listing
lg lazygit Terminal UI for Git
lzd lazydocker Terminal UI for Docker
f fzf --tmux top,50% Fuzzy finder in a Tmux popup (top, 50% height)

GitHub Copilot Aliases

Alias Command Description
gcs gh copilot suggest Get command suggestions
gce gh copilot explain Explain commands
gcc gh copilot config Configure Copilot
gca gh copilot alias Manage Copilot aliases

Claude Code Aliases

Alias Command Description
cc claude --dangerously-skip-permissions Claude Code (skip permission prompts)
cca claude --enable-auto-mode Claude Code in auto mode
ccc claude --dangerously-skip-permissions --chrome Claude Code with Chrome
ccv claude --dangerously-skip-permissions --verbose Claude Code verbose

Window Manager Service Aliases

Alias Command Description
reload-sketchybar brew services restart sketchybar Restart Sketchybar
edit-sketchybar $EDITOR $XDG_CONFIG_HOME/sketchybar Edit Sketchybar config
reload-borders brew services restart borders Restart JankyBorders
edit-borders $EDITOR $XDG_CONFIG_HOME/borders Edit JankyBorders config

AeroSpace has no reload alias — it reloads in-config via ⌥→ R (see keybindings).

Tmux Aliases

Alias Command Description
t tmux -2 Launch Tmux with 256 colors
reload-tmux tmux source-file ~/.tmux.conf Reload Tmux configuration
ad TMUX="" agent-deck Launch Agent Deck (outside a nested tmux)

Custom Functions

Function Description
y [dir] Open Yazi and cd into the last visited directory on exit
ccp [path] Launch Claude Code in a new tmux window of the main session (opens Ghostty if needed)
awsp [filter] Interactive AWS profile picker (fzf), exports AWS_PROFILE, runs aws sso login if the session expired
awst SSM port-forwarding tunnel to an RDS instance through an SSM-managed bastion (fzf pickers)
zen Toggle the Sketchybar "zen" plugin
edit-zsh / edit-tmux / edit-git Jump $EDITOR straight to the matching section of home.nix

Shortcuts & Keybindings ⌨️

AeroSpace leader key. Karabiner maps right → F18, which enters AeroSpace's aero mode. Each shortcut below is press ⌥→ (right Option), then the key. A + key fallback exists for external keyboards. Workspace keys map letters to numbers: 1 2 3 → 1-3, Q W E → 4-6, O → 7 (Obsidian), C → 8 (Claude).

Workspace & Window Focus

Shortcut Action
⌥→ 1/2/3 · Q/W/E · O/C Focus workspace 1-8
⌥→ Tab Back-and-forth between the last two workspaces
⌥→ H/J/K/L (or arrows) Focus window left/down/up/right

Move Windows

Shortcut Action
⌥→ H/J/K/L (or arrows) Move window left/down/up/right
⌥→ + workspace key (1-3, Q W E, O, C) Move window to workspace 1-8

Layout & Resize

Shortcut Action
⌥→ / Tiles layout (toggle horizontal/vertical)
⌥→ , Accordion layout
⌥→ Space Toggle floating / tiling
⌥→ F Fullscreen
⌥→ -/= Resize smart −/+50
⌥→ R Enter resize mode (H/J/K/L to resize, Enter/Esc to exit)

Service Mode & Reload

Shortcut Action
⌥→ R Reload AeroSpace config
⌥→ X Close focused window
⌥→ = Balance window sizes
⌥→ Enter Open Ghostty
⌥→ ; Enter service mode (R flatten tree, Backspace close others, H/V/S/W/T layouts, Esc reload + exit)

Tmux Keybindings 🖥️

Prefix is + a (replaces the default + b). Mouse enabled, vi copy mode, windows/panes 1-indexed.

Session & Window Management

Shortcut Action Description
prefix T sesh connect (fzf) Smart session picker (sesh)
prefix L sesh last Switch to last session
prefix r source-file ~/.tmux.conf Reload configuration
prefix c new-window New window (current path)
prefix b / n previous/next-window Previous / next window
prefix X kill-window Close window

Pane Management

Shortcut Action Description
prefix h/j/k/l select-pane Focus pane left/down/up/right
h/j/k/l vim-aware select-pane Focus pane (tmux.nvim, no prefix)
prefix H/J/K/L resize-pane (repeatable) Resize pane
prefix v / s split-window -h / -v Split horizontal / vertical (current path)
prefix x kill-pane Close pane
prefix V copy-mode Enter vi copy mode
prefix u fzf-url Pick a URL from the pane

Note

Plugins (TPM): tmux-sensible, tmux-yank, tmux-cpu, tmux-battery, tmux-fzf-url. The prefix key ( + a) must be pressed and released before most commands.

Zed Configuration ⚡

My Zed editor configuration with custom keybindings and tasks.

Keybindings 🎹

General Navigation

Shortcut Context Action Description
+ h Editor workspace::ActivatePaneLeft Focus left pane
+ j Editor workspace::ActivatePaneDown Focus down pane
+ k Editor workspace::ActivatePaneUp Focus up pane
+ l Editor workspace::ActivatePaneRight Focus right pane
+ @ Editor editor::RestartLanguageServer Restart language server
+ ù Editor git_panel::ToggleFocus Toggle Git panel
+ < Editor editor::ToggleInlayHints Toggle inlay hints
+ + k Editor editor::DeleteLine Delete current line
+ g Editor editor::SelectLargerSyntaxNode Select larger syntax node
+ + g Editor editor::SelectSmallerSyntaxNode Select smaller syntax node
+ i Editor assistant::InlineAssist Inline AI assist
+ ; Editor go_to_line::Toggle Toggle go to line
+ + r Editor editor::Rename Rename symbol

Formatting and Movement

Shortcut Context Action Description
+ + f Editor editor::Format Format current file
+ k Editor editor::MoveLineUp Move line up
+ j Editor editor::MoveLineDown Move line down
+ Editor editor::MoveLineUp Move line up
+ Editor editor::MoveLineDown Move line down
+ + p Editor markdown::OpenPreview Open markdown preview

Task Shortcuts

Shortcut Context Action Description
+ + t Workspace task::Spawn Open task launcher
+ f Workspace task::Spawn "Files: FZF" Open FZF file finder
+ y Workspace task::Spawn "Files: Yazi" Open Yazi file manager
+ g Workspace task::Spawn "Git: Lazygit" Open Lazygit
+ r Workspace task::Spawn "Files: Rename Files (Script)" Run file rename script
+ d Workspace task::Spawn "Database: Redis CLI" Open Redis CLI
+ + d Workspace task::Spawn "Docker: Lazydocker" Open Lazydocker
+ + k Workspace task::Spawn "Kubernetes: Lazykube" Open Lazykube
+ t Workspace task::Spawn "Laravel: Test" Run Laravel tests
+ + t Workspace task::Spawn "Laravel: Test (coverage)" Run Laravel tests with coverage
+ + m Workspace task::Spawn "Laravel: Migrate (fresh and seed)" Run Laravel migration fresh with seed
+ p Workspace task::Spawn "Files: Generate Project Structure file" Generate project structure file

AI and Terminal

Shortcut Context Action Description
+ + i Workspace assistant::ToggleFocus Toggle AI assistant
+ Esc Terminal terminal::ToggleViMode Toggle Vi mode in terminal

Note

See the Zed Keybindings Documentation for more information.

Vim-Mode Keybindings 🧙‍♂️

Editor Navigation

Shortcut Action Description
z + a editor::ToggleFold Toggle fold at cursor
z + l editor::Fold Fold at cursor
z + L editor::FoldAll Fold all regions
z + h editor::UnfoldLines Unfold at cursor
z + H editor::UnfoldAll Unfold all regions
+ n pane::ActivateNextItem Next tab/buffer
+ b pane::ActivatePreviousItem Previous tab/buffer
+ x pane::CloseActiveItem Close active tab/buffer
+ - pane::SplitRight Split pane right
+ = pane::SplitDown Split pane down

Space Leader Commands

Shortcut Action Description
Space + ; go_to_line::Toggle Toggle go to line
Space + R editor::Rename Rename symbol
Space + @ editor::RestartLanguageServer Restart language server
Space + g editor::SelectLargerSyntaxNode Select larger syntax node
Space + G editor::SelectSmallerSyntaxNode Select smaller syntax node
Space + j terminal_panel::ToggleFocus Toggle terminal panel
Space + ù git_panel::ToggleFocus Toggle Git panel
Space + 0 vim::StartOfDocument Go to start of document
Space + o editor::Hover Show hover information
Space + Tab pane::ActivateNextItem Next tab/buffer
Space + + Tab pane::ActivatePreviousItem Previous tab/buffer
Space + + s project_symbols::Toggle Toggle project symbols
Space + . editor::ToggleCodeActions Toggle code actions
Space + + a editor::FindAllReferences Find all references
Space + w + d pane::CloseActiveItem Close active item
Space + * vim::MoveToNext (partial_word) Move to next occurrence of word
Space + ¨ vim::MoveToPrevious (partial_word) Move to previous occurrence of word

Task Commands

Shortcut Action Description
Space + t + r task::Spawn "Files: Rename Files (Script)" Run file rename script
Space + t + f task::Spawn "Files: FZF" Open FZF file finder
Space + t + y task::Spawn "Files: Yazi" Open Yazi file manager
Space + t + d task::Spawn "Docker: Lazydocker" Open Lazydocker
Space + t + k task::Spawn "Kubernetes: Lazykube" Open Lazykube
Space + t + p task::Spawn "Files: Generate Project Structure file" Generate project structure file
Space + t + l task::Spawn "Git: Generate Git Logs file" Generate Git logs file
Space + t + L task::Spawn "Git: Generate Git Logs file (All)" Generate all Git logs file
Space + g + g task::Spawn "Git: Lazygit" Open Lazygit
Space + t + t task::Spawn "Laravel: Test" Run Laravel tests
Space + t + T task::Spawn "Laravel: Test (coverage)" Run Laravel tests with coverage
Space + M task::Spawn "Laravel: Migrate (fresh and seed)" Run Laravel migration fresh with seed

File & Search Operations

Shortcut Action Description
Space + f + f file_finder::Toggle Toggle file finder
Space + f + p projects::OpenRecent Open recent project
Space + f + b vim::Search Search in current file
Space + f + s outline::Toggle Toggle outline view
Space + f + r search::ToggleReplace Toggle search & replace
Space + f + l go_to_line::Toggle Toggle go to line
Space + d editor::SelectAllMatches Select all matches
Space + e project_panel::ToggleFocus Toggle project panel
Space + b + f editor::Format Format current file

AI Assistant

Shortcut Action Description
Space + i assistant::InlineAssist Inline AI assist
Space + c + c + o assistant::ToggleFocus Toggle AI assistant
Space + c + c + p assistant::QuoteSelection Quote selected text to assistant

Settings & Configuration

Shortcut Action Description
Space + s + k zed::OpenKeymap Open keymap settings
Space + s + s zed::OpenSettings Open settings
Space + s + t zed::OpenTasks Open tasks
Space + s + T theme_selector::Toggle Toggle theme selector
Space + s + d diagnostics::Deploy Deploy diagnostics

Note

You can use the default Vim keybindings in Zed by enabling Vim mode in the settings. See the Zed Vim Documentation for more information.

Tasks 🔄

Task Name Command Description
Git: Generate Git Logs file ~/.config/zed/tasks/generate_git_log.sh $(git rev-parse --abbrev-ref HEAD) 400 Generate Git logs for current branch (limited entries)
Git: Generate Git Logs file (All) ~/.config/zed/tasks/generate_git_log.sh $(git rev-parse --abbrev-ref HEAD) 999999 Generate Git logs for current branch (all entries)
Git: Lazygit lazygit -p $ZED_WORKTREE_ROOT Open Lazygit in project root
Files: Rename Files (Script) ~/.config/zed/tasks/rename_files.sh "${1:Path}" "${2:Pattern}" "${3:Find}" "${4:Replace}" Interactive batch file renaming with parameters
Files: FZF fzf with preview and custom bindings Advanced file finder with preview and syntax highlighting
Files: Yazi yazi Terminal file manager in project root
Files: Generate Project Structure eza --tree --level=5 --git-ignore Generate project structure avoiding vendor/node_modules
Laravel: Test php artisan test Run Laravel tests
Laravel: Test (coverage) php artisan test --coverage Run Laravel tests with coverage
Laravel: Migrate (fresh and seed) php artisan migrate:fresh --seed Fresh database migration with seed
Laravel: Migrate (fresh) php artisan migrate:fresh Fresh database migration without seed
Docker: Lazydocker lazydocker Terminal UI for Docker
Kubernetes: Lazykube lazykube Terminal UI for Kubernetes
Database: Redis CLI redis-cli Redis command line interface

Note

The tasks are executed in the context of the current workspace. The ZED_WORKTREE_ROOT environment variable is set to the root directory of the current workspace. See the Zed Tasks Documentation for more information.

Installation 📥

One-Line Installation

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/kbrdn1/dotfiles/main/install.sh)"

Manual Installation

  1. Install Command Line Tools
xcode-select --install
  1. Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
  1. Install Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  1. Clone and Apply Dotfiles
chezmoi init https://github.com/kbrdn1/dotfiles.git
chezmoi apply
  1. Install Nix & Home Manager (CLI tools, shell, aliases — see MIGRATION_NIX.md)
# Install Nix (multi-user daemon)
sh <(curl -L https://nixos.org/nix/install) --daemon

# Apply the Home Manager config
nix run home-manager/release-24.11 -- switch --flake ~/nix-config
# thereafter: reload-nix

Post-Installation

  1. Configure system preferences:
# Keyboard
defaults write NSGlobalDomain KeyRepeat -int 1

# Screenshots
mkdir ~/Screenshots
defaults write com.apple.screencapture location ~/Screenshots
defaults write com.apple.screencapture type png
defaults write com.apple.screencapture disable-shadow -bool true

# Menu Bar
defaults write NSGlobalDomain _HIHideMenuBar -bool true

# Dock
defaults write com.apple.dock autohide -bool true
defaults write com.apple.dock autohide-time-modifier -float 0.15
  1. Grant accessibility permissions to AeroSpace and Karabiner-Elements
  2. Install SetApp applications manually
  3. Restart your computer

Acknowledgments 🙏

Special thanks to:

License 📄

This project is licensed under the MIT License - see the LICENSE file for details.

Releases

Packages

Used by

Contributors

Languages