]>
Commit | Line | Data |
---|---|---|
1 | ################################################################################ | |
2 | # Load Functions | |
3 | ################################################################################ | |
4 | source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/dotenv.zsh" | |
5 | source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/graphviz.zsh" | |
6 | source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/short-uptime.zsh" | |
7 | source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/figlet-sample.zsh" | |
8 | source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/prettify-json.zsh" | |
9 | source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/status.zsh" | |
10 | source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/sync-repos.zsh" | |
11 | source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/check-repos.zsh" | |
12 | source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/ssh-key-helpers.zsh" | |
13 | ||
14 | ################################################################################ | |
15 | # Load Modules | |
16 | ################################################################################ | |
17 | source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/environment.zsh" | |
18 | source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/editor.zsh" | |
19 | source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/history.zsh" | |
20 | source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/directory.zsh" | |
21 | source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/prompt.zsh" | |
22 | source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/vendor/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" | |
23 | source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/completion.zsh" | |
24 | source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/aliases.zsh" | |
25 | ||
26 | ################################################################################ | |
27 | # ENV VARIABLES | |
28 | ################################################################################ | |
29 | # Terminal related | |
30 | export TERM=xterm-256color | |
31 | ||
32 | # Paths | |
33 | # export JAVA_HOME=$(/usr/libexec/java_home) # Enable if using JDK, otherwise disable for performance | |
34 | export XDG_CONFIG_HOME=$HOME/.config | |
35 | export GOPATH=$HOME/projects/go | |
36 | export ANDROID_HOME=$HOME/Library/Android/sdk | |
37 | export ANDROID_NDK_HOME=$HOME/Library/Android/sdk/ndk-bundle | |
38 | export PATH=$PATH:$HOME:${GOPATH//://bin:}/bin | |
39 | export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_NDK_HOME:/Applications/calibre.app/Contents/MacOS | |
40 | ||
41 | # GPG | |
42 | export GPG_TTY=$(tty) | |
43 | ||
44 | # FZF Config | |
45 | [ -x "$(command -v fzf)" ] && source <(fzf --zsh) | |
46 | ||
47 | export FZF_DEFAULT_COMMAND='/usr/bin/env rg --color never --files --hidden -g \!.git' | |
48 | export FZF_DEFAULT_OPTS='--preview ''bat --style=numbers --color=always {} | head -500''' | |
49 | ||
50 | ################################################################################ | |
51 | # SECRET ENV VARS!! | |
52 | ################################################################################ | |
53 | ||
54 | if [[ -s "${ZDOTDIR:-$HOME}/.secrets.zsh" ]]; then | |
55 | source "${ZDOTDIR:-$HOME}/.secrets.zsh" | |
56 | fi | |
57 | ||
58 | # Load a local config | |
59 | ||
60 | if [[ -s "${ZDOTDIR:-$HOME}/.zshrc.local" ]]; then | |
61 | source "${ZDOTDIR:-$HOME}/.zshrc.local" | |
62 | fi | |
63 | ||
64 | if [[ -s "/opt/homebrew/bin/brew" ]]; then | |
65 | # Brew Setup | |
66 | export PATH=/opt/homebrew/bin:/opt/homebrew/sbin:$PATH | |
67 | export FZF_VIM_PATH=/opt/homebrew/opt/fzf | |
68 | . /opt/homebrew/etc/profile.d/z.sh | |
69 | . /opt/homebrew/opt/asdf/libexec/asdf.sh | |
70 | else | |
71 | # Z (Linux) | |
72 | if [[ -s "/usr/libexec/z.sh" ]]; then | |
73 | . /usr/libexec/z.sh | |
74 | else | |
75 | if [[ -s "/usr/share/z/z.sh" ]]; then | |
76 | . /usr/share/z/z.sh | |
77 | else | |
78 | . /usr/local/etc/profile.d/z.sh | |
79 | fi | |
80 | fi | |
81 | fi | |
82 | ||
83 | # ASDF | |
84 | export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH" | |
85 | ||
86 | if [[ -s "~/.asdf/plugins/java/set-java-home.zsh" ]]; then | |
87 | . ~/.asdf/plugins/java/set-java-home.zsh | |
88 | fi |