refactor: consolidate all branches into single-branch Strategy 1

- bash/.bashrc: replace oh-my-bash with minimal unified config
  sources common → aliases → OS overlay → .bashrc.local

- zsh/.zshrc: remove hardcoded macOS PATHs (moved to macos overlay)
  clean sourcing order: common → personal → aliases → OS → .zshrc.local

- shell/common: populated with universal exports (EDITOR, HISTSIZE, etc.)
- shell/macos: Homebrew, Antigravity, Flutter PATH, fzf init, macOS aliases
- shell/linux: xdg-open, xclip, fzf init for Linux

- nvim/plugins/work.lua: Copilot plugin (migrated from origin/work branch)
- nvim/plugins/_init.lua: conditional load via DOTFILES_PROFILE=work env var

- tmux/.tmux.conf.local: per-machine override hook (~/.tmux.conf.machine.local)

- bootstrap.sh: one-command new machine setup with profile support
  usage: bash bootstrap.sh [personal|work]

- .gitignore: comprehensive .local file ignore patterns

All branches (linux, mac, work, linux_personal, linux_work, mac_personal)
can now be deleted — all unique content is merged into master.
This commit is contained in:
2026-07-18 14:38:41 +05:30
parent 52cd32ab95
commit f96891b6ec
10 changed files with 215 additions and 171 deletions
+18 -10
View File
@@ -103,18 +103,26 @@ fi
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
export PATH="/Users/jsarthak/flutter-sdk/flutter/bin:$PATH"
source <(fzf --zsh)
# Added by Antigravity
export PATH="/Users/jsarthak/.antigravity/antigravity/bin:$PATH"
export PATH="/Users/jsarthak/flutter-sdk/flutter/bin:$PATH"
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH"
source ~/.config/shell/common
source ~/.config/shell/personal
source ~/.config/shell/aliases
# ── Shared shell config ────────────────────────────────────────────────────────────────
[[ -f ~/.config/shell/common ]] && source ~/.config/shell/common
[[ -f ~/.config/shell/personal ]] && source ~/.config/shell/personal
[[ -f ~/.config/shell/aliases ]] && source ~/.config/shell/aliases
MANPAGER="col -b | cat"
MANROFFOPT="-P-c"
eval "$(zoxide init zsh)"
# ── Strategy 1: Dynamic Runtime Sourcing ─────────────────────────────────────────
# Detect OS and source the matching platform overlay.
# macos → shell/.config/shell/macos (Homebrew, Flutter, fzf, Antigravity)
# linux → shell/.config/shell/linux (xdg-open, xclip, fzf)
case "$(uname -s)" in
Darwin) [[ -f ~/.config/shell/macos ]] && source ~/.config/shell/macos ;;
Linux) [[ -f ~/.config/shell/linux ]] && source ~/.config/shell/linux ;;
esac
# ── Per-machine local override (untracked) ──────────────────────────────────
# Create ~/.zshrc.local on each machine for secrets / profile sourcing.
# On work machines: export DOTFILES_PROFILE=work && source ~/.config/shell/work
[[ -f ~/.zshrc.local ]] && source ~/.zshrc.local