My personal dotfiles
Creates symlinks from the home directory to dotfiles in this repository. Safely backs up any existing dotfiles before creating symlinks.
Features:
- Timestamped backups prevent overwrites on multiple runs
- Handles both individual dotfiles and config directories
- Preserves directory structure in backups
- Safe error handling with detailed logging
Usage:
./makesymlinks.shThe script will:
- Read the list of files to symlink from
.dotfiles - Create a timestamped backup directory (e.g.,
~/dotfiles_old_20250720_143022) - Back up any existing dotfiles to the backup directory
- Create symlinks from
~/.filenameto~/dotfiles/filename
Restores original dotfiles from backups created by makesymlinks.sh. This
completely undoes the symlink setup.
Usage:
# Restore from most recent backup automatically
./restoresymlinks.sh
# Restore from specific backup
./restoresymlinks.sh ~/dotfiles_old_20250720_143022The script will:
- Find the most recent backup (or use specified path)
- Remove symlinks created by makesymlinks.sh
- Restore original files from the backup
- Preserve any files that aren't symlinks by backing them up
Dotfiles to be symlinked are listed in .dotfiles (one per line, comments start
with #).
Setup using the following guide: YubiKey-Guide
chsh -s $(which zsh)- Install oh-my-zsh
- Install antigen for better package management
- Install Powerlevel10k theme
WezTerm is configured with a comprehensive setup including appearance customization, keybindings, project management, and status bar enhancements.
- Nord Color Scheme: Clean, modern color palette
- FantasqueSansMono Nerd Font: Crisp monospace font with icon support
- Transparency & Blur: Subtle background transparency with macOS blur effect
- Leader Key Navigation: Ctrl+Space leader key for all custom keybindings
- Project Management: Quick project switching with fuzzy search
- Workspace Support: Multiple workspaces with easy switching
- Custom Status Bar: Gradient-styled status bar showing workspace, time, and hostname
All custom keybindings use the leader key (Ctrl+Space) followed by another key:
- **Leader + **: Split horizontally (new pane to the right)
- Leader + -: Split vertically (new pane below)
- Leader + h/j/k/l: Navigate between panes (vim-style)
- Leader + r: Enter resize mode (then use h/j/k/l to resize)
- Leader + c: Close current pane (with confirmation)
- Leader + p: Open project picker (fuzzy search through ~/code directory)
- Leader + f: Show workspace fuzzy finder
The configuration automatically discovers projects in the ~/code directory and
allows quick switching between them. Each project opens in its own workspace for
better organization.
This repository uses a structured approach to manage shell settings, splitting
them between .zprofile and .zshrc to ensure correctness and efficiency.
-
~/.zprofile: This file runs once at the beginning of a login session. It is the correct place for setting environment variables likePATH,GOPATH, andEDITOR. These variables are set once and inherited by all child processes. -
~/.zshrc: This file runs for every new interactive shell (e.g., opening a new terminal tab). It is used for settings that apply to the interactive experience, such as aliases, functions, keybindings, and the shell prompt (oh-my-posh).
All PATH modifications should be made in ~/.zprofile. This prevents your
PATH from growing incorrectly with every new terminal window.
To add a new directory to your PATH, open ~/dotfiles/zprofile and add a new
line in the PATH Additions section. Follow the existing format:
- Add a comment explaining where the new
PATHentry comes from (e.g.,# From 'brew install my-new-tool'). - Add the export command. It's best practice to check if the directory
exists before adding it to the
PATH.
Example:
# From `brew install my-new-tool`
# This tool needs its bin directory in the PATH.
[ -d "/path/to/my-new-tool/bin" ] && export PATH="/path/to/my-new-tool/bin:$PATH"By following this structure, you keep your environment setup clean, well-documented, and easy to maintain.