Skip to content

Tips & Tricks

Sunil Murthy edited this page Apr 11, 2026 · 3 revisions

Tips & Tricks

General Dotfiles Management

Quick Package Installation

# Install specific groups
make shell editors tools

# Preview before installing
make plan

# Safe install with backup
make safe-install

# Adopt existing config files into stow
make adopt

Health Check

make doctor

Checks required tools (git, stow, bash), optional tools (emacs, fzf, bat, eza, fd, rg, tmux, etc.), XDG directories, broken symlinks, config validation, and GPG setup.

Troubleshooting Stow Conflicts

# Preview what would happen
make plan

# Adopt existing files then restow
make adopt

# Remove broken symlinks
make prune

Backup & Restore

# Create a timestamped backup before making changes
make backup

# Restore from latest backup
make restore

# List all available backups
make list-backups

# Clean old backups (keeps last 5)
make prune-backups

Local Customizations

Create local override files that won't be tracked by git:

# For zsh
touch ~/.config/zsh/zshrc.local

# For bash
touch ~/.config/bash/bashrc.local

# For git
touch ~/.config/git/config.local

Shell Tips

Bash Features

  • Gruvbox color theme applied automatically via dir_colors
  • Smart tool detection: aliases adapt to installed tools (e.g., uses eza over ls if available)
  • Cross-platform: macOS-specific config in darwin, auto-detects gls vs BSD ls
  • Git branch display in prompt
  • Enhanced history with timestamps
  • Modular config: aliases, colors, exports, history, prompt, shopt

Modern CLI Tool Integration

When these tools are installed, bash aliases automatically prefer them:

  • bat over cat - syntax highlighting
  • eza over ls - better file listing with git status
  • fd over find - simpler syntax
  • ripgrep over grep - faster recursive search
  • fzf - fuzzy history search with Ctrl+R
  • zoxide - smarter cd that learns your habits

Emacs Tips

Essential Productivity Tips

  • Use C-x C-f with tab completion for fast file navigation
  • M-x occur to search for patterns across the current buffer
  • C-x r m to bookmark frequently accessed files
  • M-x package-list-packages to browse and install new packages

Configuration Management

  • Restart Emacs after major configuration changes
  • Use M-x eval-buffer to reload configuration files
  • Check *Messages* buffer for startup errors

Resources

Tmux Workflow

Key Bindings (Prefix: `)

  • ` c - Create new window
  • ` n - Next window
  • ` p - Previous window
  • ` r - Reload configuration
  • Alt + 1-9 - Quick window switching

Session Management

# Create named session
tmux new-session -s work

# Attach to session
tmux attach -t work

# List sessions
tmux list-sessions

Color Theming

Gruvbox Dark Hard

The dotfiles use a consistent Gruvbox Dark Hard color scheme:

  1. GNU coreutils (best) - Full gruvbox dir_colors theme via gls
  2. BSD ls (fallback) - Gruvbox-inspired LSCOLORS on macOS
  3. eza - Modern ls with built-in color support
# Install coreutils for best colors on macOS
brew install coreutils

# Test
gls -la --color=auto

Adding a New Package

  1. Create directory at the repo root:

    mkdir -p mynewpackage/.config/mynewpackage
  2. Add your config files following XDG structure.

  3. Add it to ALL_PKGS and the appropriate group variable in the Makefile.

  4. Install:

    make mynewpackage

Maintenance

Regular Updates

# Update dotfiles repository
git pull origin main

# Re-link all packages
make sync

Removing Packages

# Remove a specific package
make rm-tmux
make rm-bash

Health Checks

# Full health check
make doctor

# List all available packages
make ls

# Check for broken symlinks
make prune