[ZSH] Speed up shell startup
Move antidote update from every shell start to update_mac.sh: it dropped the bundle cache each time, forcing a rebuild on the next start. Background the locale write and skip the brew --repository fork. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
135f00dd97
commit
b4815d1130
4 files changed
+9
-4
No files matched your search
@@ -33,5 +33,5 @@ Practical rule: **edit the `.example` source, not the generated symlink target.*
|
|||||||
|
|
||||||
## Maintenance
|
## Maintenance
|
||||||
|
|
||||||
- `./update_mac.sh` — macOS update runner. Default (no args) runs `--brew-update --cleanup --diagnostics --update-others`; other flags: `--system-update`, `--permission-fix` (strips Caskroom/App quarantine xattrs). Run `./update_mac.sh --help` for the list. `--update-others` also updates Alacritty from its verified upstream release, then runs `claude --update` and `Codex --update`.
|
- `./update_mac.sh` — macOS update runner. Default (no args) runs `--brew-update --cleanup --diagnostics --update-others`; other flags: `--system-update`, `--permission-fix` (strips Caskroom/App quarantine xattrs). Run `./update_mac.sh --help` for the list. `--update-others` also updates Alacritty from its verified upstream release and antidote plugins (not updated at shell start), then runs `claude --update` and `Codex --update`.
|
||||||
- `brew_autoupdate` — runs scheduled brew and Alacritty auto-updates.
|
- `brew_autoupdate` — runs scheduled brew and Alacritty auto-updates.
|
||||||
@@ -66,6 +66,11 @@ function update_others {
|
|||||||
echo "-- ALACRITTY"
|
echo "-- ALACRITTY"
|
||||||
"$SCRIPT_DIR/install_alacritty_mac.sh" || echo "Alacritty update failed." >&2
|
"$SCRIPT_DIR/install_alacritty_mac.sh" || echo "Alacritty update failed." >&2
|
||||||
|
|
||||||
|
if [ -f "$HOME/.antidote/antidote.zsh" ]; then
|
||||||
|
echo "-- ANTIDOTE"
|
||||||
|
zsh "$HOME/.antidote/antidote.zsh" update
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -x "$(command -v claude)" ]; then
|
if [ -x "$(command -v claude)" ]; then
|
||||||
echo "-- CLAUDE"
|
echo "-- CLAUDE"
|
||||||
claude --update
|
claude --update
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=en_US.UTF-8
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
export JAVA_HOME=`/usr/libexec/java_home`
|
export JAVA_HOME=`/usr/libexec/java_home`
|
||||||
defaults write .GlobalPreferences AppleLocale en_DE
|
# macOS resets this on updates (and at random); background it, it's slow
|
||||||
|
defaults write .GlobalPreferences AppleLocale en_DE &!
|
||||||
|
|
||||||
# Set path to work with pycharm ...
|
# Set path to work with pycharm ...
|
||||||
# [[ "$PATH" =~ /usr/local/bin ]] || export PATH=$PATH:/usr/local/bin
|
# [[ "$PATH" =~ /usr/local/bin ]] || export PATH=$PATH:/usr/local/bin
|
||||||
@@ -27,7 +28,7 @@ alias tailscale=/Applications/Tailscale.app/Contents/MacOS/Tailscale
|
|||||||
#alias virt-manager="LD_PRELOAD=/opt/homebrew/Cellar/glib/2.86.0/lib virt-manager"
|
#alias virt-manager="LD_PRELOAD=/opt/homebrew/Cellar/glib/2.86.0/lib virt-manager"
|
||||||
#alias virt-manager="LD_PRELOAD=/opt/homebrew/Cellar/glib/2.86.0/lib $HOME/python-envs/virt-manager/bin/python3 $HOME/stuff/virt-manager/virt-manager"
|
#alias virt-manager="LD_PRELOAD=/opt/homebrew/Cellar/glib/2.86.0/lib $HOME/python-envs/virt-manager/bin/python3 $HOME/stuff/virt-manager/virt-manager"
|
||||||
|
|
||||||
HOMEBREW_COMMAND_NOT_FOUND_HANDLER="$(brew --repository)/Library/Homebrew/command-not-found/handler.sh"
|
HOMEBREW_COMMAND_NOT_FOUND_HANDLER="${HOMEBREW_REPOSITORY:-$(brew --repository)}/Library/Homebrew/command-not-found/handler.sh"
|
||||||
if [ -f "$HOMEBREW_COMMAND_NOT_FOUND_HANDLER" ]; then
|
if [ -f "$HOMEBREW_COMMAND_NOT_FOUND_HANDLER" ]; then
|
||||||
source "$HOMEBREW_COMMAND_NOT_FOUND_HANDLER";
|
source "$HOMEBREW_COMMAND_NOT_FOUND_HANDLER";
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ source "${ZDOTDIR:-$HOME}/.zsh/lib/prompt.zsh"
|
|||||||
|
|
||||||
alias screenshot_mode='powerlevel10k_plugin_unload; export PS1="$ "; python3 ~/.config/alacritty/screenshot_mode.py on'
|
alias screenshot_mode='powerlevel10k_plugin_unload; export PS1="$ "; python3 ~/.config/alacritty/screenshot_mode.py on'
|
||||||
alias screenshot_mode_off='prompt_powerlevel9k_setup; python3 ~/.config/alacritty/screenshot_mode.py off'
|
alias screenshot_mode_off='prompt_powerlevel9k_setup; python3 ~/.config/alacritty/screenshot_mode.py off'
|
||||||
antidote update &>/dev/null &|
|
|
||||||
|
|
||||||
[[ -d "$HOME/.lmstudio/bin" ]] && path+=("$HOME/.lmstudio/bin")
|
[[ -d "$HOME/.lmstudio/bin" ]] && path+=("$HOME/.lmstudio/bin")
|
||||||
[[ -d "$HOME/.runai/bin" ]] && path+=("$HOME/.runai/bin")
|
[[ -d "$HOME/.runai/bin" ]] && path+=("$HOME/.runai/bin")
|
||||||
|
|||||||
Reference in new issue
Block a user