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 🛠

Our essential command-line tools:

  • Package Management

    • Homebrew: The missing package manager for macOS
    • Asdf: Multi-language version manager
  • Core Utilities

  • Shell & Terminal

  • Development Tools

    • PHP & Composer: PHP ecosystem
    • Python: Programming language
    • Symfony CLI: Symfony framework tools
    • Node.js: JavaScript runtime
    • Rust: Systems programming language
    • Go: Programming language
    • Bun: JavaScript runtime & toolkit
    • Deno: JavaScript runtime
  • Productivity Tools

GUI Tools 🖥

Essential graphical tools:

Applications 📦

Key applications:

SetApp Applications 📦

Premium applications via SetApp:

Aliases & Functions 🔧

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
edit-zsh $EDITOR ~/.zshrc Edit ZSH configuration

Development Aliases

Alias Command Description
py, python /usr/bin/python3 Python 3
pa, laravel php artisan PHP Artisan CLI
a, adonis node ace Adonis Ace CLI
ls eza --color=always --long --git --no-filesize --icons=always --no-time --no-user --no-permissions --group-directories-first Enhanced listing
cd zoxide Enhanced directory navigation
lg lazygit Terminal UI for Git
lzd lazydocker Terminal UI for Docker
f fzf --tmux top,50% Fuzzy finder in Tmux fixed on top with 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

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
reload-yabai yabai --restart-service Restart Yabai
edit-yabai $EDITOR $XDG_CONFIG_HOME/yabai Edit Yabai config
reload-skhd skhd --restart-service Restart SKHD
edit-skhd $EDITOR $XDG_CONFIG_HOME/skhd/skhdrc Edit SKHD config

Tmux Aliases

Alias Command Description
t tmux -2 Launch Tmux with 256 colors
reload-tmux tmux source-file ~/.tmux.conf Reload Tmux configuration
edit-tmux $EDITOR ~/.tmux.conf Edit Tmux configuration

Shortcuts & Keybindings ⌨️

Space & Window Navigation

Shortcut Action
+ 1-5 Focus space 1-5 on current display
+ h/j/k/l Focus window in direction (west/south/north/east)
+ 0 Focus first window
+ $ Focus last window
+ Space Toggle float window
+ + f Toggle fullscreen
+ f Toggle parent zoom

Window Management

Shortcut Action
+ + h/j/k/l Move window in direction
+ + s Toggle split orientation
+ + 1-5 Move window to space 1-5
+ + b/n Move window to prev/next space

Window Stacking & Resizing

Shortcut Action
+ + h/j/k/l Stack window in direction
+ + b/p Navigate through stack
+ + h/j/k/l Resize window
+ + e Equalize window sizes
+ + g Toggle gaps

Miscellaneous Controls

Shortcut Action
+ -/_ Create new window in horizontal/vertical split
+ + Space Toggle Sketchybar visibility
+ + r Reload Sketchybar

Tmux Keybindings 🖥️

Shortcut Action Description
+ s prefix Prefix key (replaces default + b)

Session Management

Shortcut Action Description
prefix + r source-file ~/.tmux.conf Reload tmux configuration
prefix + o tmux-sessionx Open session manager
prefix + Space which-key Show available keybindings

Window Management

Shortcut Action Description
prefix + c new-window Create new window
prefix + + H previous-window Go to previous window
prefix + + L next-window Go to next window
prefix + + x kill-window Close current window

Pane Management

Shortcut Action Description
prefix + h select-pane -L Focus left pane
prefix + j select-pane -D Focus down pane
prefix + k select-pane -U Focus up pane
prefix + l select-pane -R Focus right pane
prefix + x kill-pane Close current pane
prefix + - split-window -h Split pane horizontally
prefix + _ split-window -v Split pane vertically

Note

The prefix key ( + s) must be pressed before using most tmux commands. After pressing the prefix key, release it before pressing the command key.

Zed Configuration ⚡

My Zed editor configuration with custom keybindings and tasks.

Keybindings 🎹

Shortcut Context Action Description
+ @ Editor editor::RestartLanguageServer Restart language server
+ ù Editor git_panel::ToggleFocus Toggle Git panel
+ + i Workspace assistant::ToggleFocus Toggle AI assistant
+ + t Workspace task::Spawn Open task launcher
+ z 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" 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" Generate project structure file
+ l Workspace task::Spawn "Git: Generate Git Logs" Generate Git logs file
+ + l Workspace task::Spawn "Git: Generate Git Logs (All)" Generate complete Git logs file

Note

See the Zed Keybindings Documentation for more information.

Vim-Mode Keybindings 🧙‍♂️

Shortcut Action Description
Space + R editor::Rename Rename symbol
Space + r task::Spawn "Files: Rename Files" Run file rename script
Space + t + r task::Spawn "Database: Redis CLI" Open Redis CLI
Space + t + d task::Spawn "Docker: Lazydocker" Open Lazydocker
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
Space + f + f file_finder::Toggle Toggle file finder
Space + f + b vim::Search Search in current file
Space + f + s outline::Toggle Toggle outline view
Space + i assistant::InlineAssist Inline AI assist
Space + e project_panel::ToggleFocus Toggle project panel
Space + F editor::Format Format current file

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 ~/.config/zed/tasks/generate_git_log.sh Generate Git logs for current branch
Git: Lazygit lazygit -p $ZED_WORKTREE_ROOT Open Lazygit in project root
Files: Rename Files ~/.config/zed/tasks/rename_files.sh Script to batch rename files
Files: FZF fzf with preview Interactive file finder with preview
Files: Yazi yazi Terminal file manager
Files: Generate Project Structure eza --tree Generate project structure text file
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
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

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. Set up Yabai permissions
  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.