configs-all 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/.claude/settings.local.json +3 -0
  2. package/CLAUDE.md +94 -0
  3. package/README.md +424 -0
  4. package/TERMINAL_SHORTCUTS.md +96 -0
  5. package/WINDOWS_COMPATIBILITY.md +85 -0
  6. package/WINDOWS_MCP_SETUP.md +133 -0
  7. package/apps/RectangleConfig.plist +0 -0
  8. package/apps/Synergy +84 -0
  9. package/apps/iStat Menus Settings.ismp7 +0 -0
  10. package/claude/CLAUDE.md +228 -0
  11. package/claude/commands/changelog.md +36 -0
  12. package/claude/commands/commit.md +29 -0
  13. package/claude/commands/context.md +112 -0
  14. package/claude/commands/dash.md +37 -0
  15. package/claude/commands/deploy-check.md +37 -0
  16. package/claude/commands/deps.md +26 -0
  17. package/claude/commands/duplo.md +56 -0
  18. package/claude/commands/explain.md +43 -0
  19. package/claude/commands/fix-and-test.md +46 -0
  20. package/claude/commands/game-debug.md +66 -0
  21. package/claude/commands/games.md +53 -0
  22. package/claude/commands/go.md +147 -0
  23. package/claude/commands/guard.md +102 -0
  24. package/claude/commands/handoff.md +66 -0
  25. package/claude/commands/incident.md +144 -0
  26. package/claude/commands/init.md +78 -0
  27. package/claude/commands/k8s-debug.md +31 -0
  28. package/claude/commands/lint.md +27 -0
  29. package/claude/commands/merge-all.md +115 -0
  30. package/claude/commands/merge.md +129 -0
  31. package/claude/commands/mikpc.md +54 -0
  32. package/claude/commands/morning.md +72 -0
  33. package/claude/commands/partymode.md +105 -0
  34. package/claude/commands/plans.md +88 -0
  35. package/claude/commands/pr.md +41 -0
  36. package/claude/commands/prep.md +132 -0
  37. package/claude/commands/push-sync.md +82 -0
  38. package/claude/commands/push.md +34 -0
  39. package/claude/commands/research.md +73 -0
  40. package/claude/commands/retro.md +95 -0
  41. package/claude/commands/review-pr.md +96 -0
  42. package/claude/commands/review.md +41 -0
  43. package/claude/commands/scaffold-agent.md +45 -0
  44. package/claude/commands/setup.md +92 -0
  45. package/claude/commands/ship-prod.md +97 -0
  46. package/claude/commands/ship.md +82 -0
  47. package/claude/commands/simplify.md +42 -0
  48. package/claude/commands/spike.md +110 -0
  49. package/claude/commands/status.md +37 -0
  50. package/claude/commands/sync.md +72 -0
  51. package/claude/commands/test.md +29 -0
  52. package/claude/commands/triage.md +72 -0
  53. package/claude/desktop/claude_desktop_config.json +9 -0
  54. package/claude/hooks.json +15 -0
  55. package/claude/mcp-servers.duplo.json +8 -0
  56. package/claude/mcp-servers.json +62 -0
  57. package/claude/scripts/psdebug.ps1 +7 -0
  58. package/claude/settings.json +38 -0
  59. package/claude/settings.local.json +4 -0
  60. package/claude/statusline-command.sh +94 -0
  61. package/claude/templates/CLAUDE-k8s-devops.md +58 -0
  62. package/claude/templates/CLAUDE-python-agent.md +47 -0
  63. package/claude/templates/CLAUDE-typescript-frontend.md +50 -0
  64. package/docker/ai-stack/docker-compose.yml +76 -0
  65. package/docker/ai-stack/searxng/limiter.toml +3 -0
  66. package/docker/ai-stack/searxng/settings.yml +39 -0
  67. package/docker/cli/config.json.template +15 -0
  68. package/docker/cli/daemon.json +9 -0
  69. package/docker/cli/features.json +3 -0
  70. package/docker/mcp/catalog.json +9 -0
  71. package/docker/mcp/catalogs/docker-mcp.yaml +15107 -0
  72. package/docker/mcp/config.yaml +0 -0
  73. package/docker/mcp/registry.yaml +37 -0
  74. package/docker/mcp/tools.yaml +0 -0
  75. package/docs/context/.gitkeep +0 -0
  76. package/docs/context/2026-03-02-configs.md +142 -0
  77. package/docs/handoff/.gitkeep +0 -0
  78. package/docs/incidents/.gitkeep +0 -0
  79. package/docs/plans/2026-02-28-autonomous-command-suite-design.md +250 -0
  80. package/docs/plans/2026-02-28-autonomous-command-suite.md +682 -0
  81. package/docs/plans/2026-03-01-ai-stack-split-architecture.md +72 -0
  82. package/docs/plans/2026-03-02-ai-stack-expansion.md +33 -0
  83. package/docs/plans/2026-03-02-merge-commands-design.md +58 -0
  84. package/docs/plans/2026-03-02-merge-commands.md +354 -0
  85. package/docs/research/.gitkeep +0 -0
  86. package/docs/research/2026-03-02-configs-repo-architecture.md +152 -0
  87. package/docs/retros/.gitkeep +0 -0
  88. package/docs/retros/2026-03-01-ai-stack-split-architecture.md +38 -0
  89. package/docs/spikes/.gitkeep +0 -0
  90. package/gh/config.yml +16 -0
  91. package/gh/hosts.yml +5 -0
  92. package/gh/main.json +103 -0
  93. package/ghostty/config +90 -0
  94. package/git/config/base.gitconfig +46 -0
  95. package/git/config/chiefmikey.gitconfig +11 -0
  96. package/git/config/personal.gitconfig +10 -0
  97. package/git/config/work.gitconfig +14 -0
  98. package/ide/cursor/extensions.txt +111 -0
  99. package/ide/cursor/keybindings.json +307 -0
  100. package/ide/cursor/mcp.json +92 -0
  101. package/ide/cursor/settings.json +544 -0
  102. package/ide/vscode/extensions.txt +120 -0
  103. package/ide/vscode/insiders/extensions.txt +119 -0
  104. package/ide/vscode/insiders/keybindings.json +294 -0
  105. package/ide/vscode/insiders/settings.json +518 -0
  106. package/ide/vscode/keybindings.json +294 -0
  107. package/ide/vscode/settings.json +526 -0
  108. package/ide/vscode/vscode/extensions.txt +43 -0
  109. package/iterm/Mikey Pro.json +951 -0
  110. package/iterm/com.googlecode.iterm2.plist +5549 -0
  111. package/iterm/font/MesloLGS NF Bold Italic.ttf +0 -0
  112. package/iterm/font/MesloLGS NF Bold.ttf +0 -0
  113. package/iterm/font/MesloLGS NF Italic.ttf +0 -0
  114. package/iterm/font/MesloLGS NF Regular.ttf +0 -0
  115. package/package.json +15 -0
  116. package/scripts/ai/deploy-ai-stack.sh +119 -0
  117. package/scripts/ai/fix-ai-proxy.service +12 -0
  118. package/scripts/ai/fix-ai-proxy.sh +25 -0
  119. package/scripts/brew/search/brew-search-results.sh +19 -0
  120. package/scripts/brew/search/brew-search.sh +34 -0
  121. package/scripts/brew/upgrade/brew-upgrade-autoupdate.sh +5 -0
  122. package/scripts/brew/upgrade/brew-upgrade-full-auto.sh +89 -0
  123. package/scripts/brew/upgrade/brew-upgrade-full.sh +159 -0
  124. package/scripts/docker/cleanup/docker-cleanup-manage.sh +163 -0
  125. package/scripts/docker/cleanup/docker-cleanup.cron +12 -0
  126. package/scripts/docker/cleanup/docker-cleanup.sh +280 -0
  127. package/scripts/docker/install/README.md +23 -0
  128. package/scripts/docker/install/docker-al2.sh +7 -0
  129. package/scripts/docker/install/docker-compose-al2.sh +15 -0
  130. package/scripts/gh/auth/auth.sh +12 -0
  131. package/scripts/gh/config/gh-config.sh +3 -0
  132. package/scripts/gh/gist/gh-gist-create.sh +29 -0
  133. package/scripts/gh/gist/gh-gist-delete.sh +1 -0
  134. package/scripts/gh/gist/gh-gist-edit.sh +8 -0
  135. package/scripts/gh/gpg-key/gh-gpg-key-add.sh +3 -0
  136. package/scripts/gh/install/install.sh +7 -0
  137. package/scripts/gh/label/gh-label-clone.sh +0 -0
  138. package/scripts/gh/label/gh-label-create.sh +0 -0
  139. package/scripts/gh/label/gh-label-delete.sh +0 -0
  140. package/scripts/gh/label/gh-label-edit.sh +0 -0
  141. package/scripts/gh/label/gh-label-list.sh +0 -0
  142. package/scripts/gh/secret/gh-secret-delete.sh +24 -0
  143. package/scripts/gh/secret/gh-secret-set.sh +70 -0
  144. package/scripts/gh/ssh-key/gh-ssh-key-add.sh +8 -0
  145. package/scripts/git/add/git-add.sh +3 -0
  146. package/scripts/git/auth/README.md +11 -0
  147. package/scripts/git/auth/https.sh +20 -0
  148. package/scripts/git/auth/ssh-mac.sh +41 -0
  149. package/scripts/git/branch-delete/git-branch-delete.sh +16 -0
  150. package/scripts/git/checkout/git-checkout-stash.sh +32 -0
  151. package/scripts/git/temp/git-temp-pull.sh +6 -0
  152. package/scripts/git/temp/git-temp-push.sh +5 -0
  153. package/scripts/install/fresh.zsh +34 -0
  154. package/scripts/install/full-install.zsh +193 -0
  155. package/scripts/linux/codedeploy/README.md +19 -0
  156. package/scripts/linux/codedeploy/linux-codedeploy-al2.sh +13 -0
  157. package/scripts/linux/codedeploy/linux-codedeploy-index.sh +16 -0
  158. package/scripts/linux/codedeploy/linux-codedeploy-ubuntu.sh +14 -0
  159. package/scripts/linux/coredns/README.md +17 -0
  160. package/scripts/linux/coredns/linux-coredns-al2.sh +29 -0
  161. package/scripts/linux/wifi/01-netconf.yaml +21 -0
  162. package/scripts/linux/wifi/wifi-ubuntu.sh +17 -0
  163. package/scripts/mac/dock-sort/mac-dock-sort.sh +87 -0
  164. package/scripts/mac/dropbox-ignore/mac-dropbox-ignore.sh +12 -0
  165. package/scripts/mac/sudo-askpass/mac-sudo-askpass.sh +50 -0
  166. package/scripts/mac/sudo-askpass/setup-sudo-password.sh +49 -0
  167. package/scripts/mac/upgrade/mac-upgrade.sh +21 -0
  168. package/scripts/mac/vpn/mac-vpn.sh +4 -0
  169. package/scripts/mcp/aws-mcp-wrapper.ps1 +97 -0
  170. package/scripts/mcp/aws-mcp-wrapper.sh +53 -0
  171. package/scripts/mcp/duplo-mcp-wrapper.sh +31 -0
  172. package/scripts/mcp/filesystem-mcp-wrapper.ps1 +43 -0
  173. package/scripts/mcp/filesystem-mcp-wrapper.sh +34 -0
  174. package/scripts/mcp/git-mcp-wrapper.ps1 +42 -0
  175. package/scripts/mcp/git-mcp-wrapper.sh +33 -0
  176. package/scripts/mcp/github-mcp-wrapper.ps1 +43 -0
  177. package/scripts/mcp/github-mcp-wrapper.sh +19 -0
  178. package/scripts/mcp/kubernetes-mcp-wrapper.ps1 +22 -0
  179. package/scripts/mcp/kubernetes-mcp-wrapper.sh +16 -0
  180. package/scripts/mcp/mcp-launcher.ps1 +56 -0
  181. package/scripts/mcp/mcp-launcher.sh +71 -0
  182. package/scripts/mcp/mongodb-mcp-wrapper.ps1 +26 -0
  183. package/scripts/mcp/mongodb-mcp-wrapper.sh +17 -0
  184. package/scripts/mcp/notion-mcp-wrapper.ps1 +23 -0
  185. package/scripts/mcp/notion-mcp-wrapper.sh +14 -0
  186. package/scripts/mcp/postgres-mcp-wrapper.ps1 +23 -0
  187. package/scripts/mcp/postgres-mcp-wrapper.sh +16 -0
  188. package/scripts/npm/ncu/npm-ncu.sh +24 -0
  189. package/scripts/npm/upgrade/npm-upgrade.sh +51 -0
  190. package/scripts/qmk/build_reviung41.sh +28 -0
  191. package/scripts/qmk/sync_unicorne.sh +44 -0
  192. package/scripts/sync/README.md +64 -0
  193. package/scripts/sync/config-common.zsh +882 -0
  194. package/scripts/sync/pull-configs.ps1 +33 -0
  195. package/scripts/sync/pull-configs.zsh +278 -0
  196. package/scripts/sync/push-configs.ps1 +91 -0
  197. package/scripts/sync/push-configs.zsh +384 -0
  198. package/shell/alias/alias-d.zsh +333 -0
  199. package/shell/alias/alias.zsh +36 -0
  200. package/shell/alias/categories/development.zsh +157 -0
  201. package/shell/alias/categories/environment.zsh +13 -0
  202. package/shell/alias/categories/git.zsh +40 -0
  203. package/shell/alias/categories/github-functions.zsh +459 -0
  204. package/shell/alias/categories/network.zsh +46 -0
  205. package/shell/alias/categories/path.zsh +46 -0
  206. package/shell/alias/categories/system.zsh +78 -0
  207. package/shell/alias/categories/wolfe-server.zsh +11 -0
  208. package/shell/powershell/Microsoft.PowerShell_profile.ps1 +208 -0
  209. package/shell/zsh/.p10k.zsh +1832 -0
  210. package/shell/zsh/.zshrc +87 -0
  211. package/shell/zsh/config/completion.zsh +31 -0
  212. package/shell/zsh/config/functions.zsh +31 -0
  213. package/shell/zsh/config/keybindings.zsh +13 -0
  214. package/shell/zsh/config/options.zsh +56 -0
  215. package/shell/zsh/config/plugins.zsh +83 -0
  216. package/shell/zsh/config/variables.zsh +191 -0
  217. package/shell/zsh/powerlevel10k.zsh-theme +83 -0
  218. package/shell/zsh/zsh-autosuggestions.zsh +871 -0
  219. package/ssh/config +46 -0
  220. package/ssh/config.duplo +21 -0
  221. package/ssh/config.mikpc +35 -0
  222. package/ssh/personal_signing.pub +1 -0
  223. package/templates/.envrc.example +34 -0
  224. package/templates/.envrc.quickstart +17 -0
  225. package/wezterm/wezterm.lua +249 -0
  226. package/wsl/.wslconfig +3 -0
  227. package/wsl/wsl.conf +18 -0
@@ -0,0 +1,87 @@
1
+ # Zsh Configuration - Main Entry Point
2
+ # Detect CONFIG_DIR dynamically based on hostname
3
+ HOST="$(hostname)"
4
+ case "${HOST}" in
5
+ "mikmac")
6
+ CONFIG_DIR="${HOME}/Dropbox/dev/configs"
7
+ ;;
8
+ "mikbook")
9
+ CONFIG_DIR="${HOME}/Dropbox/mikbook/dev/configs"
10
+ ;;
11
+ "duplo")
12
+ CONFIG_DIR="${HOME}/Dropbox/duplo/dev/chiefmikey/configs"
13
+ ;;
14
+ "mikpc")
15
+ # Windows PC - WSL path (zsh runs in WSL on Windows)
16
+ # Try to detect Dropbox location - could be in WSL home or Windows mount
17
+ if [[ -d "${HOME}/Dropbox/mikpc/dev/configs" ]]; then
18
+ CONFIG_DIR="${HOME}/Dropbox/mikpc/dev/configs"
19
+ elif [[ -f /proc/version ]] && grep -qi microsoft /proc/version 2>/dev/null; then
20
+ # In WSL, try to detect Windows username and check Windows Dropbox location
21
+ local win_user=""
22
+ if command -v cmd.exe >/dev/null 2>&1; then
23
+ win_user=$(cmd.exe /c "echo %USERNAME%" 2>/dev/null | tr -d '\r\n' || echo "")
24
+ fi
25
+ if [[ -n "$win_user" ]] && [[ -d "/mnt/c/Users/${win_user}/Dropbox/mikpc/dev/configs" ]]; then
26
+ CONFIG_DIR="/mnt/c/Users/${win_user}/Dropbox/mikpc/dev/configs"
27
+ elif [[ -d "/mnt/c/Users/${USER}/Dropbox/mikpc/dev/configs" ]]; then
28
+ CONFIG_DIR="/mnt/c/Users/${USER}/Dropbox/mikpc/dev/configs"
29
+ else
30
+ # Fallback - use WSL home location
31
+ CONFIG_DIR="${HOME}/Dropbox/mikpc/dev/configs"
32
+ fi
33
+ else
34
+ # Fallback - use WSL home location
35
+ CONFIG_DIR="${HOME}/Dropbox/mikpc/dev/configs"
36
+ fi
37
+ ;;
38
+ *)
39
+ # Fallback - try to find configs directory
40
+ CONFIG_DIR="${HOME}/Dropbox/dev/configs"
41
+ ;;
42
+ esac
43
+
44
+ # Load variables first
45
+ if [ -f "${CONFIG_DIR}/shell/zsh/config/variables.zsh" ]; then
46
+ source "${CONFIG_DIR}/shell/zsh/config/variables.zsh"
47
+ else
48
+ echo "Warning: Variables file not found at ${CONFIG_DIR}/shell/zsh/config/variables.zsh"
49
+ fi
50
+
51
+ # Host-specific debug output
52
+ case "${HOST}" in
53
+ "mikmac")
54
+ echo "++mikmac++"
55
+ ;;
56
+ "mikbook")
57
+ echo "++mikbook++"
58
+ ;;
59
+ "duplo")
60
+ echo "++duplo++"
61
+ ;;
62
+ "mikpc")
63
+ echo "++mikpc++"
64
+ ;;
65
+ esac
66
+
67
+ # Helper function to source config files with error checking
68
+ load_config() {
69
+ local config_file="$1"
70
+ local config_name="$2"
71
+
72
+ if [[ -f "$config_file" ]]; then
73
+ source "$config_file"
74
+ else
75
+ echo "Warning: $config_name not found at $config_file"
76
+ fi
77
+ }
78
+
79
+ # Load modular configuration files
80
+ load_config "${CONFIG_DIR}/shell/zsh/config/options.zsh" "zsh options"
81
+ load_config "${CONFIG_DIR}/shell/zsh/config/completion.zsh" "completion config"
82
+ load_config "${CONFIG_DIR}/shell/zsh/config/keybindings.zsh" "keybindings"
83
+ load_config "${CONFIG_DIR}/shell/zsh/config/plugins.zsh" "plugins"
84
+ load_config "${CONFIG_DIR}/shell/zsh/config/functions.zsh" "functions"
85
+
86
+ # Load aliases
87
+ load_config "${CONFIG_DIR}/shell/alias/alias.zsh" "aliases"
@@ -0,0 +1,31 @@
1
+ #!/bin/zsh
2
+
3
+ # Docker CLI completions
4
+ if [[ -d "${HOME}/.docker/completions" ]]; then
5
+ fpath=("${HOME}/.docker/completions" $fpath)
6
+ fi
7
+
8
+ # Completion system initialization
9
+ autoload -Uz compinit
10
+ # Only run compinit once per day for performance
11
+ if [[ -n ${ZDOTDIR:-${HOME}}/.zcompdump(#qN.mh+24) ]]; then
12
+ compinit -d ${ZDOTDIR:-${HOME}}/.zcompdump
13
+ else
14
+ compinit -C -d ${ZDOTDIR:-${HOME}}/.zcompdump
15
+ fi
16
+
17
+ # Better completion behavior
18
+ zstyle ':completion:*' menu select # Visual menu for completions
19
+ zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case insensitive matching
20
+ zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS:-}" # Colored completion listings
21
+ zstyle ':completion:*' group-name '' # Group matches by category
22
+ zstyle ':completion:*:descriptions' format '%F{yellow}-- %d --%f'
23
+ zstyle ':completion:*:warnings' format '%F{red}No matches found%f'
24
+ zstyle ':completion:*' special-dirs true # Complete . and .. directories
25
+
26
+ # Better kill completion
27
+ zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
28
+ zstyle ':completion:*:*:*:*:processes' command "ps -u ${USER} -o pid,user,comm -w -w"
29
+
30
+ # Directory-specific completions
31
+ zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
@@ -0,0 +1,31 @@
1
+ #!/bin/zsh
2
+
3
+ # Smart directory shortcuts (e.g., ~dev will expand to your dev directory)
4
+ hash -d dev="${DEV}"
5
+ hash -d configs="${CONFIG_DIR}"
6
+ hash -d dropbox="${DROPBOX}"
7
+
8
+ # Auto-update terminal title with current directory
9
+ precmd() {
10
+ print -Pn "\e]0;%~\a"
11
+ }
12
+
13
+ # Useful functions
14
+ # Quick directory navigation - type "d" to see directory stack
15
+ d() {
16
+ if [[ -n $1 ]]; then
17
+ dirs "$@"
18
+ else
19
+ dirs -v | head -10
20
+ fi
21
+ }
22
+
23
+ # Quick parent directory navigation
24
+ alias ...='cd ../..'
25
+ alias ....='cd ../../..'
26
+ alias .....='cd ../../../..'
27
+
28
+ # Enable direnv for all hosts (used for per-repo environment variables)
29
+ if command -v direnv >/dev/null 2>&1; then
30
+ eval "$(direnv hook zsh)"
31
+ fi
@@ -0,0 +1,13 @@
1
+ #!/bin/zsh
2
+
3
+ # Key bindings for better navigation
4
+ bindkey '^[[A' history-substring-search-up # Up arrow for history search
5
+ bindkey '^[[B' history-substring-search-down # Down arrow for history search
6
+ bindkey '^[[H' beginning-of-line # Home key
7
+ bindkey '^[[F' end-of-line # End key
8
+ bindkey '^[[3~' delete-char # Delete key
9
+ bindkey '^R' history-incremental-search-backward # Ctrl+R for reverse search
10
+
11
+ # Word boundaries for option+arrow/option+backspace navigation
12
+ # Minimal set so word-by-word movement stops at /, ., and other natural path boundaries
13
+ export WORDCHARS='_-'
@@ -0,0 +1,56 @@
1
+ #!/bin/zsh
2
+
3
+ # History configuration
4
+ HISTFILE="${HOME}/.zsh_history"
5
+ HISTSIZE=100000
6
+ SAVEHIST=100000
7
+ setopt INC_APPEND_HISTORY # Append to history file immediately, but only recall session history
8
+ setopt HIST_FIND_NO_DUPS # Skip duplicates when scrolling through history with arrow keys
9
+ setopt HIST_EXPIRE_DUPS_FIRST # When trimming history, expire duplicates first
10
+ setopt HIST_IGNORE_DUPS # Don't record duplicate entries
11
+ setopt HIST_IGNORE_ALL_DUPS # Delete old entry if new entry is duplicate
12
+ setopt HIST_IGNORE_SPACE # Don't record entries starting with space
13
+ setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording
14
+ setopt HIST_VERIFY # Show command with history expansion before running
15
+
16
+ # Additional useful options
17
+ setopt AUTO_CD # Change to directory without typing cd
18
+ setopt CORRECT # Suggest corrections for misspelled commands
19
+ setopt EXTENDED_GLOB # Extended globbing patterns
20
+ setopt NO_BEEP # Disable beep on error
21
+ setopt AUTO_PUSHD # Make cd push the old directory onto the directory stack
22
+ setopt PUSHD_IGNORE_DUPS # Don't push duplicate directories onto the stack
23
+ setopt PUSHD_SILENT # Don't print the directory stack after pushd or popd
24
+ setopt AUTO_LIST # Automatically list choices on ambiguous completion
25
+ setopt AUTO_MENU # Automatically use menu completion
26
+ setopt COMPLETE_IN_WORD # Allow completion from within a word
27
+ setopt ALWAYS_TO_END # Move cursor to end of word after completion
28
+ setopt LIST_PACKED # Make completion lists more compact
29
+ setopt REC_EXACT # Try exact match first
30
+
31
+ # Directory navigation improvements
32
+ setopt PUSHD_MINUS # Exchange meaning of + and - for directory stack
33
+ setopt CDABLE_VARS # If cd arg isn't a dir, try to expand it as a variable
34
+
35
+ # Completion improvements
36
+ setopt AUTO_PARAM_SLASH # Add trailing slash to directory names
37
+ setopt AUTO_PARAM_KEYS # Intelligent completion of parameter names
38
+
39
+ # Globbing improvements
40
+ setopt GLOB_DOTS # Include dotfiles in globbing (without explicitly specifying)
41
+ setopt NUMERIC_GLOB_SORT # Sort filenames numerically when possible
42
+ setopt MARK_DIRS # Append trailing slash to directory names from glob
43
+
44
+ # Job control
45
+ setopt AUTO_RESUME # Attempt to resume existing job before creating new process
46
+ setopt LONG_LIST_JOBS # List jobs in long format by default
47
+ setopt NOTIFY # Report status of background jobs immediately
48
+
49
+ # Safety features
50
+ setopt IGNORE_EOF # Require 10x Ctrl+D to exit shell (prevents accidental close)
51
+ setopt RM_STAR_WAIT # 10 second wait before confirming rm * or rm path/*
52
+ setopt CLOBBER # Allow > redirection to overwrite existing files (explicit)
53
+
54
+ # Performance
55
+ setopt HASH_CMDS # Remember locations of commands for faster execution
56
+ setopt HASH_DIRS # Remember locations of directories for faster access
@@ -0,0 +1,83 @@
1
+ #!/bin/zsh
2
+
3
+ # Autosuggest configuration
4
+ export ZSH_AUTOSUGGEST_STRATEGY=history
5
+ export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#707070"
6
+ export ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20
7
+ export ZSH_AUTOSUGGEST_USE_ASYNC=1
8
+
9
+ # Load plugins with error checking
10
+ load_plugin() {
11
+ local plugin_path="$1"
12
+ local plugin_name="$2"
13
+
14
+ if [[ -f "$plugin_path" ]]; then
15
+ source "$plugin_path"
16
+ else
17
+ echo "Warning: $plugin_name not found at $plugin_path"
18
+ fi
19
+ }
20
+
21
+ # Source plugins
22
+ load_plugin "${CONFIG_DIR}/shell/zsh/zsh-autosuggestions.zsh" "zsh-autosuggestions"
23
+ load_plugin "${CONFIG_DIR}/shell/zsh/.p10k.zsh" "powerlevel10k config"
24
+
25
+ # Try to source zsh-history-substring-search from various locations
26
+ # HOMEBREW_PREFIX is set in variables.zsh (loaded before this file)
27
+ if [[ -n "${HOMEBREW_PREFIX:-}" ]] && [[ -f "${HOMEBREW_PREFIX}/share/zsh-history-substring-search/zsh-history-substring-search.zsh" ]]; then
28
+ source "${HOMEBREW_PREFIX}/share/zsh-history-substring-search/zsh-history-substring-search.zsh"
29
+ elif [[ -f "/usr/local/share/zsh-history-substring-search/zsh-history-substring-search.zsh" ]]; then
30
+ source "/usr/local/share/zsh-history-substring-search/zsh-history-substring-search.zsh"
31
+ elif [[ -f "${ZSH_CUSTOM:-${HOME}/.oh-my-zsh/custom}/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh" ]]; then
32
+ source "${ZSH_CUSTOM:-${HOME}/.oh-my-zsh/custom}/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh"
33
+ elif [[ -f "/usr/share/zsh-history-substring-search/zsh-history-substring-search.zsh" ]]; then
34
+ source "/usr/share/zsh-history-substring-search/zsh-history-substring-search.zsh"
35
+ else
36
+ echo "Warning: zsh-history-substring-search plugin not found. Install with 'brew install zsh-history-substring-search'"
37
+ fi
38
+
39
+ # Load theme and syntax highlighting plugins
40
+ # HOMEBREW_PREFIX is set in variables.zsh (loaded before this file)
41
+ if [[ -n "${HOMEBREW_PREFIX:-}" ]]; then
42
+ load_plugin "${HOMEBREW_PREFIX}/share/powerlevel10k/powerlevel10k.zsh-theme" "powerlevel10k theme"
43
+ load_plugin "${HOMEBREW_PREFIX}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" "zsh-syntax-highlighting"
44
+ # Homebrew command-not-found integration is in variables.zsh
45
+ else
46
+ # Non-Homebrew fallbacks (Linux/WSL)
47
+ # powerlevel10k
48
+ if [[ -f "${ZSH_CUSTOM:-${HOME}/.oh-my-zsh/custom}/themes/powerlevel10k/powerlevel10k.zsh-theme" ]]; then
49
+ load_plugin "${ZSH_CUSTOM:-${HOME}/.oh-my-zsh/custom}/themes/powerlevel10k/powerlevel10k.zsh-theme" "powerlevel10k theme"
50
+ elif [[ -f "/usr/share/powerlevel10k/powerlevel10k.zsh-theme" ]]; then
51
+ load_plugin "/usr/share/powerlevel10k/powerlevel10k.zsh-theme" "powerlevel10k theme"
52
+ fi
53
+ # zsh-syntax-highlighting
54
+ if [[ -f "${ZSH_CUSTOM:-${HOME}/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ]]; then
55
+ load_plugin "${ZSH_CUSTOM:-${HOME}/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" "zsh-syntax-highlighting"
56
+ elif [[ -f "/usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ]]; then
57
+ load_plugin "/usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" "zsh-syntax-highlighting"
58
+ fi
59
+ fi
60
+
61
+ # fzf - fuzzy finder (replaces Ctrl+R with full-screen fuzzy history search)
62
+ if command -v fzf >/dev/null 2>&1; then
63
+ if fzf --zsh &>/dev/null; then
64
+ eval "$(fzf --zsh)"
65
+ else
66
+ # fzf < 0.48 doesn't support --zsh; source integration scripts directly
67
+ [[ -f /usr/share/doc/fzf/examples/key-bindings.zsh ]] && source /usr/share/doc/fzf/examples/key-bindings.zsh
68
+ [[ -f /usr/share/doc/fzf/examples/completion.zsh ]] && source /usr/share/doc/fzf/examples/completion.zsh
69
+ fi
70
+ export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --border'
71
+ export FZF_CTRL_R_OPTS='--sort --exact'
72
+ fi
73
+
74
+ # zoxide - smarter cd (learns your most-used directories)
75
+ if command -v zoxide >/dev/null 2>&1; then
76
+ eval "$(zoxide init zsh)"
77
+ fi
78
+
79
+ # bat - syntax-highlighted cat
80
+ if command -v bat >/dev/null 2>&1; then
81
+ alias cat="bat --paging=never"
82
+ export BAT_THEME="TwoDark"
83
+ fi
@@ -0,0 +1,191 @@
1
+ #!/bin/zsh
2
+ # Variable definitions
3
+ # This file should be sourced first before any other config files
4
+
5
+ # Platform detection
6
+ # Detect if running in WSL (Windows Subsystem for Linux)
7
+ if [[ -n "${WSL_DISTRO_NAME:-}" ]] || [[ -f /proc/version ]] && grep -qi microsoft /proc/version 2>/dev/null; then
8
+ IS_WSL=true
9
+ IS_WINDOWS=true
10
+ else
11
+ IS_WSL=false
12
+ # Check if on macOS
13
+ if [[ "$OSTYPE" == "darwin"* ]]; then
14
+ IS_WINDOWS=false
15
+ IS_MAC=true
16
+ else
17
+ IS_WINDOWS=false
18
+ IS_MAC=false
19
+ fi
20
+ fi
21
+
22
+ # Core environment variables with zsh parameter expansion
23
+ # Use associative array for cleaner hostname mapping
24
+ typeset -A HOST_MAPPINGS
25
+ HOST_MAPPINGS=(
26
+ "mikmac" "dev"
27
+ "mikbook" "mikbook/dev"
28
+ "duplo" "duplo/dev"
29
+ "mikpc" "mikpc/dev"
30
+ )
31
+
32
+ # Set LOCAL_DEV with fallback using zsh parameter expansion
33
+ LOCAL_DEV="${HOST_MAPPINGS[$HOST]:-dev}"
34
+
35
+ # Derived variables - handle Windows/WSL paths
36
+ if [[ "$IS_WSL" == "true" ]]; then
37
+ # In WSL, Dropbox might be at /mnt/c/Users/... or mounted at ~/Dropbox
38
+ # Try standard location first, fall back to Windows mount point
39
+ if [[ -d "${HOME}/Dropbox" ]]; then
40
+ export DROPBOX="${HOME}/Dropbox"
41
+ elif [[ -n "${WINDOWS_USER:-}" ]] && [[ -d "/mnt/c/Users/${WINDOWS_USER}/Dropbox" ]]; then
42
+ export DROPBOX="/mnt/c/Users/${WINDOWS_USER}/Dropbox"
43
+ elif [[ -d "/mnt/c/Users/${USER}/Dropbox" ]]; then
44
+ export DROPBOX="/mnt/c/Users/${USER}/Dropbox"
45
+ else
46
+ # Fallback - try to find Dropbox by checking common Windows usernames
47
+ # For mikpc, try to detect Windows username
48
+ if [[ "$HOST" == "mikpc" ]]; then
49
+ # Try to get Windows username from WSL
50
+ if command -v cmd.exe >/dev/null 2>&1; then
51
+ local win_user
52
+ win_user=$(cmd.exe /c "echo %USERNAME%" 2>/dev/null | tr -d '\r\n' || echo "")
53
+ if [[ -n "$win_user" ]] && [[ -d "/mnt/c/Users/${win_user}/Dropbox" ]]; then
54
+ export DROPBOX="/mnt/c/Users/${win_user}/Dropbox"
55
+ export WINDOWS_USER="$win_user"
56
+ fi
57
+ fi
58
+ fi
59
+ # Final fallback
60
+ if [[ -z "${DROPBOX:-}" ]]; then
61
+ export DROPBOX="${HOME}/Dropbox"
62
+ fi
63
+ fi
64
+ else
65
+ export DROPBOX="${HOME}/Dropbox"
66
+ fi
67
+
68
+ export DEV="${DROPBOX}/${LOCAL_DEV}"
69
+
70
+ # CONFIG_DIR should already be set by the calling script
71
+ # Do not override it if it's already set
72
+ if [ -z "${CONFIG_DIR:-}" ]; then
73
+ export CONFIG_DIR="${DEV}/configs"
74
+ else
75
+ # CONFIG_DIR is already set, use it as is
76
+ export CONFIG_DIR
77
+ fi
78
+
79
+ export SCRIPT_DIR="${CONFIG_DIR}/scripts"
80
+
81
+ # User local bin (e.g. Claude Code, pip --user)
82
+ export PATH="$HOME/.local/bin:$PATH"
83
+
84
+ # Additional derived variables
85
+ export ZSHRC="${CONFIG_DIR}/shell/zsh/.zshrc"
86
+ # 1Password SSH agent - platform-aware
87
+ if [[ "$IS_MAC" == "true" ]]; then
88
+ export SSH_AUTH_SOCK="$HOME/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
89
+ fi
90
+ # WSL uses native SSH key (~/.ssh/id_ed25519) configured in ssh/config.mikpc
91
+
92
+ # Project-specific paths
93
+ export GITLANG_DIR="${DEV}/gitlang"
94
+ export CHALET_LE_JAR_DIR="${DEV}/chalet-le-jar"
95
+
96
+ # Node.js memory configuration by host
97
+ case "${HOST}" in
98
+ "mikmac")
99
+ NODE_OPTIONS="--max_old_space_size=32768" # 32GB for 64GB RAM machine
100
+ ;;
101
+ "mikbook")
102
+ NODE_OPTIONS="--max_old_space_size=8192" # 8GB for 16GB RAM machine
103
+ ;;
104
+ "duplo")
105
+ NODE_OPTIONS="--max_old_space_size=8192" # 8GB for 16GB RAM machine
106
+ ;;
107
+ "mikpc")
108
+ NODE_OPTIONS="--max_old_space_size=8192" # 8GB default for Windows PC
109
+ ;;
110
+ *)
111
+ NODE_OPTIONS="--max_old_space_size=4096" # 4GB default fallback
112
+ ;;
113
+ esac
114
+ export NODE_OPTIONS
115
+
116
+ # Current user
117
+ CURRENT_USER="$(whoami)"
118
+ export CURRENT_USER
119
+
120
+ # Homebrew configuration (macOS only)
121
+ if [[ "$IS_MAC" == "true" ]]; then
122
+ HOMEBREW_PREFIX=$(brew --prefix 2>/dev/null || echo "/opt/homebrew")
123
+ export HOMEBREW_PREFIX
124
+
125
+ # Homebrew command-not-found integration (zsh-compatible)
126
+ # Set required environment variables for Homebrew's bash scripts when running in zsh
127
+ export BASH_VERSION="5.0.0"
128
+ export HOMEBREW_COMMAND_NOT_FOUND_CI="1"
129
+
130
+ # Load Homebrew's command-not-found handler with zsh compatibility
131
+ HOMEBREW_COMMAND_NOT_FOUND_HANDLER="${HOMEBREW_PREFIX}/Library/Homebrew/command-not-found/handler.sh"
132
+ if [ -f "$HOMEBREW_COMMAND_NOT_FOUND_HANDLER" ]; then
133
+ # Source the handler with proper error handling
134
+ source "$HOMEBREW_COMMAND_NOT_FOUND_HANDLER" 2>/dev/null || true
135
+ fi
136
+
137
+ # Coreutils PATH (for timeout and other GNU utilities)
138
+ if [ -d "${HOMEBREW_PREFIX}/opt/coreutils/libexec/gnubin" ]; then
139
+ export PATH="${HOMEBREW_PREFIX}/opt/coreutils/libexec/gnubin:$PATH"
140
+ fi
141
+ fi
142
+
143
+ # Development environment paths
144
+ export NVM_DIR="${HOME}/.nvm"
145
+ export PYENV_ROOT="${HOME}/.pyenv"
146
+
147
+ # Compiler flags for various tools (macOS only - Homebrew paths)
148
+ if [[ "$IS_MAC" == "true" ]]; then
149
+ # Build LDFLAGS and CPPFLAGS dynamically based on available Homebrew prefix
150
+ LDFLAGS_PARTS=()
151
+ CPPFLAGS_PARTS=()
152
+ PKG_CONFIG_PARTS=()
153
+
154
+ # Check for curl in both possible locations
155
+ if [[ -d "${HOMEBREW_PREFIX}/opt/curl/lib" ]]; then
156
+ LDFLAGS_PARTS+=("-L${HOMEBREW_PREFIX}/opt/curl/lib")
157
+ CPPFLAGS_PARTS+=("-I${HOMEBREW_PREFIX}/opt/curl/include")
158
+ PKG_CONFIG_PARTS+=("${HOMEBREW_PREFIX}/opt/curl/lib/pkgconfig")
159
+ elif [[ -d "/usr/local/opt/curl/lib" ]]; then
160
+ LDFLAGS_PARTS+=("-L/usr/local/opt/curl/lib")
161
+ CPPFLAGS_PARTS+=("-I/usr/local/opt/curl/include")
162
+ PKG_CONFIG_PARTS+=("/usr/local/opt/curl/lib/pkgconfig")
163
+ fi
164
+
165
+ # Check for tcl-tk in both possible locations
166
+ if [[ -d "${HOMEBREW_PREFIX}/opt/tcl-tk/lib" ]]; then
167
+ LDFLAGS_PARTS+=("-L${HOMEBREW_PREFIX}/opt/tcl-tk/lib")
168
+ CPPFLAGS_PARTS+=("-I${HOMEBREW_PREFIX}/opt/tcl-tk/include")
169
+ PKG_CONFIG_PARTS+=("${HOMEBREW_PREFIX}/opt/tcl-tk/lib/pkgconfig")
170
+ fi
171
+
172
+ export LDFLAGS="${LDFLAGS_PARTS[*]}"
173
+ export CPPFLAGS="${CPPFLAGS_PARTS[*]}"
174
+ export PKG_CONFIG_PATH="${(j.:.)PKG_CONFIG_PARTS}"
175
+
176
+ # .NET configuration - check common installation locations
177
+ if [[ -d "${HOMEBREW_PREFIX}/share/dotnet" ]]; then
178
+ export DOTNET_ROOT="${HOMEBREW_PREFIX}/share/dotnet"
179
+ elif [[ -d "/usr/local/share/dotnet" ]]; then
180
+ export DOTNET_ROOT="/usr/local/share/dotnet"
181
+ elif [[ -d "${HOME}/.dotnet" ]]; then
182
+ export DOTNET_ROOT="${HOME}/.dotnet"
183
+ fi
184
+ fi
185
+ export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
186
+
187
+ # GPG configuration
188
+ GPG_TTY="$(tty 2>/dev/null || true)"
189
+ if [[ -n "${GPG_TTY}" ]]; then
190
+ export GPG_TTY
191
+ fi
@@ -0,0 +1,83 @@
1
+ # vim:ft=zsh ts=2 sw=2 sts=2 et fenc=utf-8
2
+ ################################################################
3
+ # Powerlevel10k Theme
4
+ # https://github.com/romkatv/powerlevel10k
5
+ #
6
+ # Forked from Powerlevel9k Theme
7
+ # https://github.com/bhilburn/powerlevel9k
8
+ #
9
+ # Which in turn was forked from Agnoster Theme
10
+ # https://github.com/robbyrussell/oh-my-zsh/blob/74177c5320b2a1b2f8c4c695c05984b57fd7c6ea/themes/agnoster.zsh-theme
11
+ ################################################################
12
+
13
+ # Temporarily change options.
14
+ 'builtin' 'local' '-a' '__p9k_src_opts'
15
+ [[ ! -o 'aliases' ]] || __p9k_src_opts+=('aliases')
16
+ [[ ! -o 'sh_glob' ]] || __p9k_src_opts+=('sh_glob')
17
+ [[ ! -o 'no_brace_expand' ]] || __p9k_src_opts+=('no_brace_expand')
18
+ 'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'
19
+
20
+ (( $+__p9k_root_dir )) || typeset -gr __p9k_root_dir=${POWERLEVEL9K_INSTALLATION_DIR:-${${(%):-%x}:A:h}}
21
+ (( $+__p9k_intro )) || {
22
+ # Leading spaces before `local` are important. Otherwise Antigen will remove `local` (!!!).
23
+ # __p9k_trapint is to work around bugs in zsh: https://www.zsh.org/mla/workers/2020/msg00612.html.
24
+ # Likewise for `trap ":"` instead of the plain `trap ""`.
25
+ typeset -gr __p9k_intro_base='emulate -L zsh -o no_hist_expand -o extended_glob -o no_prompt_bang -o prompt_percent -o no_prompt_subst -o no_aliases -o no_bg_nice -o typeset_silent -o no_rematch_pcre
26
+ (( $+__p9k_trapped )) || { local -i __p9k_trapped; trap : INT; trap "trap ${(q)__p9k_trapint:--} INT" EXIT }
27
+ local -a match mbegin mend
28
+ local -i MBEGIN MEND OPTIND
29
+ local MATCH OPTARG IFS=$'\'' \t\n\0'\'
30
+ typeset -gr __p9k_intro_locale='[[ $langinfo[CODESET] != (utf|UTF)(-|)8 ]] && _p9k_init_locale && { [[ -n $LC_ALL ]] && local LC_ALL=$__p9k_locale || local LC_CTYPE=$__p9k_locale }'
31
+ typeset -gr __p9k_intro_no_locale="${${__p9k_intro_base/ match / match reply }/ MATCH / MATCH REPLY }"
32
+ typeset -gr __p9k_intro_no_reply="$__p9k_intro_base; $__p9k_intro_locale"
33
+ typeset -gr __p9k_intro="$__p9k_intro_no_locale; $__p9k_intro_locale"
34
+ }
35
+
36
+ zmodload zsh/langinfo
37
+
38
+ function _p9k_init_locale() {
39
+ if (( ! $+__p9k_locale )); then
40
+ typeset -g __p9k_locale=
41
+ (( $+commands[locale] )) || return
42
+ local -a loc
43
+ loc=(${(@M)$(locale -a 2>/dev/null):#*.(utf|UTF)(-|)8}) || return
44
+ (( $#loc )) || return
45
+ typeset -g __p9k_locale=${loc[(r)(#i)C.UTF(-|)8]:-${loc[(r)(#i)en_US.UTF(-|)8]:-$loc[1]}}
46
+ fi
47
+ [[ -n $__p9k_locale ]]
48
+ }
49
+
50
+ () {
51
+ eval "$__p9k_intro"
52
+ if (( $+__p9k_sourced )); then
53
+ (( $+functions[_p9k_setup] )) && _p9k_setup
54
+ return 0
55
+ fi
56
+ typeset -gr __p9k_dump_file=${XDG_CACHE_HOME:-~/.cache}/p10k-dump-${(%):-%n}.zsh
57
+ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file ]] && (( ! $+functions[_p9k_preinit] )) && source $__p9k_dump_file 2>/dev/null && (( $+functions[_p9k_preinit] )); then
58
+ _p9k_preinit
59
+ fi
60
+ typeset -gr __p9k_sourced=13
61
+ if [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]]; then
62
+ if [[ -w $__p9k_root_dir && -w $__p9k_root_dir/internal && -w $__p9k_root_dir/gitstatus ]]; then
63
+ local f
64
+ for f in $__p9k_root_dir/{powerlevel9k.zsh-theme,powerlevel10k.zsh-theme,internal/p10k.zsh,internal/icons.zsh,internal/configure.zsh,internal/worker.zsh,internal/parser.zsh,gitstatus/gitstatus.plugin.zsh,gitstatus/install}; do
65
+ [[ $f.zwc -nt $f ]] && continue
66
+ zmodload -F zsh/files b:zf_mv b:zf_rm
67
+ local tmp=$f.tmp.$$.zwc
68
+ {
69
+ # `zf_mv -f src dst` fails on NTFS if `dst` is not writable, hence `zf_rm`.
70
+ zf_rm -f -- $f.zwc && zcompile -R -- $tmp $f && zf_mv -f -- $tmp $f.zwc
71
+ } always {
72
+ (( $? )) && zf_rm -f -- $tmp
73
+ }
74
+ done
75
+ fi
76
+ fi
77
+ builtin source $__p9k_root_dir/internal/p10k.zsh || true
78
+ }
79
+
80
+ (( $+__p9k_instant_prompt_active )) && unsetopt prompt_cr prompt_sp || setopt prompt_cr prompt_sp
81
+
82
+ (( ${#__p9k_src_opts} )) && setopt ${__p9k_src_opts[@]}
83
+ 'builtin' 'unset' '__p9k_src_opts'