Skip to content

leoluyi/dotfiles

Repository files navigation

dotfiles

Personal dotfiles for macOS (primary), Ubuntu, and CentOS. Uses GNU Stow to symlink config directories into $HOME.

Setup

macOS

Clone and run the bootstrap script:

git clone https://github.com/leoluyi/dotfiles.git ~/.dotfiles \
  && cd ~/.dotfiles \
  && ./bootstrap_macos.sh

To re-run without confirmation prompts:

set -- -f; bash bootstrap_macos.sh

Ubuntu / CentOS

./bootstrap_ubuntu.sh
# or
./bootstrap_centos.sh

Individual Steps

Install applications

./install_apps_macos.sh   # macOS (Homebrew + casks + MAS)
./install_apps_ubuntu.sh  # Ubuntu

macOS setup scripts

macOS-only setup scripts live under scripts/macos/ (run from repo root). Cross-platform installers stay at scripts/ root.

./scripts/macos/setup-macos-preferences.sh        # system defaults (Finder, Dock, etc.)
./scripts/macos/setup-macos-keyboard-shortcuts.sh # import symbolic hotkeys
./scripts/macos/setup-macos-menubar-spacing.sh    # menu bar item spacing
./scripts/macos/setup-macos-bash.sh               # install bash 5.x via Homebrew
./scripts/macos/setup-quicklook-markdown.sh       # make Markdown Preview the Quick Look .md engine
./scripts/macos/fix-quicklook.sh                  # clear quarantine on legacy .qlgenerator plugins
./scripts/macos/setup-espanso-watchdog.sh         # install espanso-watchdog launchd agent
./scripts/macos/disable-espanso-app-login-item.sh # remove espanso's duplicate login item
./scripts/macos/setup-OpenInTerminal-Lite-*.sh    # set OpenInTerminal-Lite default terminal

Stow a specific package

# From repo root
stow -t "$HOME" common_dotfiles
stow -t "$HOME" nvim

# Dry run
stow -n -t "$HOME" common_dotfiles

Secrets & Local Overrides

Never commit credentials or machine-specific settings to this repo. Two escape hatches are auto-sourced by .bash_profile on every shell startup:

~/.secrets/ — credentials and API keys

Create the directory and drop shell files into it. Each file is sourced in alphabetical order.

mkdir -p ~/.secrets

# Example: ~/.secrets/api_keys
cat > ~/.secrets/api_keys <<'EOF'
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="..."
EOF

The directory lives entirely outside the dotfiles repo and should never be committed anywhere.

~/.config/bash/99_extra — local machine overrides

For settings that are real config (not secrets) but shouldn't be shared — e.g., work-specific aliases, host-specific paths. Sourced automatically by .bash_profile as the last file in ~/.config/bash/.

# Example: ~/.config/bash/99_extra
export WORK_PROXY="http://proxy.corp:3128"
alias vpn='openconnect corp.example.com'

This file is gitignored and won't be created by bootstrap. Create it manually as needed.

AI / LLM Shell Integrations

Shell functions via llm CLI (llm-cmd, llm-explain, llm-fix, Alt+a) and fabric-ai (?? general query). Custom fabric patterns are tracked in this repo and symlinked via Stow.

See docs/ai-workflow.md for full setup and usage details.

Cheatsheets

References

Releases

Packages

Used by

Contributors

Languages