-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathzshrc
131 lines (102 loc) · 4.61 KB
/
zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# Amazon Q pre block. Keep at the top of this file.
### q slow debugging ###
# date
# echo "STARTING: amazon q pre block loading from .zshrc"
# # set zsh to echo verbose
# set -x
# ###
# [[ -f "${HOME}/Library/Application Support/amazon-q/shell/zshrc.pre.zsh" ]] && builtin source "${HOME}/Library/Application Support/amazon-q/shell/zshrc.pre.zsh"
# ### q slow debugging ###
# date
# # unset zsh to echo verbose
# set +x
# echo "DONE: amazon q pre block loaded from .zshrc"
###
## AMAZON Q MAKES EVERYTHING SLOWWWWWW
# shellcheck disable=SC2148 disable=SC1090 shell=bash
# ~/.zshrc
# set +x
set +m # Make jobs quiet by default
# There is an alias to jump to the directory with the various
# included zsh configs, simply type `zshconfig` at the prompt.
####### PROFILING #######
# Uncomment below to enable debug timing
# zmodload zsh/zprof
# Remember to uncomment zprof at the end of the file!
#### END PROFILING ######
bg_silent() {
# background a task quietly and disown
{ "$@" 2>&3 & } 3>&2 2>/dev/null
disown &>/dev/null
}
## Source all configs
if [[ -d $HOME/Library/Mobile\ Documents/com\~apple\~CloudDocs/Dropbox\ Import/dotfiles/shell_config ]]; then
for file in "$HOME"/Library/Mobile\ Documents/com\~apple\~CloudDocs/Dropbox\ Import/dotfiles/shell_config/*.rc; do
source "$file"
done
fi
## Add ssh keys to agent if not already added
# ssh-add-keys # TODO: disabled 2025-03-16 to see if it helps performance, reenable if ssh stops working
### Below are items added by installer scripts (usually homebrew) ####
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
source /opt/homebrew/Cellar/fzf/*/shell/key-bindings.zsh
# Enable direnv - https://direnv.net
# eval "$(direnv hook zsh)"
if_not_in_vscode bg_silent test -e "${HOME}/.iterm2_shell_integration.zsh" && bg_silent source "${HOME}/.iterm2_shell_integration.zsh"
zstyle ':completion:*' menu select
fpath+=~/.zfunc
set -m # reenable job output
# >>> mamba initialize >>>
# !! Contents within this block are managed by 'mamba init' !!
# export MAMBA_EXE='/opt/homebrew/opt/micromamba/bin/micromamba';
# export MAMBA_ROOT_PREFIX='/Users/samm/micromamba';
# __mamba_setup="$("$MAMBA_EXE" shell hook --shell zsh --root-prefix "$MAMBA_ROOT_PREFIX" 2> /dev/null)"
# if [ $? -eq 0 ]; then
# eval "$__mamba_setup"
# else
# alias micromamba="$MAMBA_EXE" # Fallback on help from mamba activate
# fi
# unset __mamba_setup
# # <<< mamba initialize <<<
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
# __conda_setup="$('/opt/homebrew/Caskroom/mambaforge/base/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
# if [ $? -eq 0 ]; then
# eval "$__conda_setup"
# else
# if [ -f "/opt/homebrew/Caskroom/mambaforge/base/etc/profile.d/conda.sh" ]; then
# . "/opt/homebrew/Caskroom/mambaforge/base/etc/profile.d/conda.sh"
# else
# export PATH="/opt/homebrew/Caskroom/mambaforge/base/bin:$PATH"
# fi
# fi
# unset __conda_setup
# if [ -f "/opt/homebrew/Caskroom/mambaforge/base/etc/profile.d/mamba.sh" ]; then
# . "/opt/homebrew/Caskroom/mambaforge/base/etc/profile.d/mamba.sh"
# fi
# <<< conda initialize <<<
### zoxide ###
eval "$(zoxide init zsh)"
### zoxide ###
# Load custom aliases
export PATH="$PATH:/Users/samm/Fltr"
# tabtab source for electron-forge package
# uninstall by removing these lines or running `tabtab uninstall electron-forge`
# [[ -f /Users/samm/.npm/_npx/6913fdfd1ea7a741/node_modules/tabtab/.completions/electron-forge.zsh ]] && . /Users/samm/.npm/_npx/6913fdfd1ea7a741/node_modules/tabtab/.completions/electron-forge.zsh
# Added by LM Studio CLI tool (lms)
export PATH="$PATH:/Users/samm/.cache/lm-studio/bin"
if [ -f "/Users/samm/.config/fabric/fabric-bootstrap.inc" ] && if_not_in_vscode; then . "/Users/samm/.config/fabric/fabric-bootstrap.inc"; fi
fpath+=~/.zfunc
export PATH="/opt/homebrew/opt/tcl-tk@8/bin:$PATH"
# Amazon Q post block. Keep at the bottom of this file.
# # The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/samm/Downloads/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/samm/Downloads/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/Users/samm/Downloads/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/samm/Downloads/google-cloud-sdk/completion.zsh.inc'; fi
# # Amazon Q post block. Keep at the bottom of this file.
# [[ -f "${HOME}/Library/Application Support/amazon-q/shell/zshrc.post.zsh" ]] && builtin source "${HOME}/Library/Application Support/amazon-q/shell/zshrc.post.zsh"
# ####### PROFILING #######
# # Uncomment below to enable debug timing
# zprof
# #### END PROFILING ######
# echo ".zshrc loaded now"