-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
72 lines (57 loc) · 2.22 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
#
# Executes commands at the start of an interactive session.
#
# Authors:
# Sorin Ionescu <[email protected]>
#
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
# User configuration
# In an anonymous function to avoid leaking the local variables to the shell
function() {
# Setting up Homebrew
homebrew_dir="$HOME/homebrew"
[[ -d $homebrew_dir ]] && PATH="$homebrew_dir/bin:$homebrew_dir/sbin:$PATH"
# add custom scripts to path
scripts_bin="$HOME/.config/bin"
[[ -d $scripts_bin ]] && PATH="$PATH:$scripts_bin"
# add rust binaries to path
rust_bin="$HOME/.cargo/bin"
[[ -d $rust_bin ]] && PATH="$PATH:$rust_bin"
android_sdk='/opt/android_sdk'
if [[ -d $android_sdk ]]; then
export ANDROID_SDK=$android_sdk
export ANDROID_HOME=$android_sdk
PATH="$PATH:$android_sdk/tools:$android_sdk/platform-tools"
fi
android_ndk='/opt/android_ndk'
[[ -d $android_ndk ]] && export ANDROID_NDK_REPOSITORY=$android_ndk
fbsource_dir="$HOME/source/fbsource"
if [[ -d $fbsource_dir ]]; then
export FBANDROID_DIR="$fbsource_dir/fbandroid"
export FBOBJC_DIR="$fbsource_dir/fbobjc"
export XPLAT_DIR="$fbsource_dir/xplat"
fi
pybase=$(python3 -m site --user-base)
[[ -d "$pybase/bin" ]] && PATH="$PATH:$pybase/bin"
onepassword="$HOME/.1password"
[[ -d $onepassword ]] && export SSH_AUTH_SOCK="$onepassword/agent.sock"
if [[ $TERM_PROGRAM != "WarpTerminal" ]]; then
##### WHAT YOU WANT TO DISABLE FOR WARP - BELOW
# iTerm2 Shell integration
iterm2="$HOME/.iterm2_shell_integration.zsh"
[[ -e $iterm2 ]] && source $iterm2
# POWERLEVEL10K
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
##### WHAT YOU WANT TO DISABLE FOR WARP - ABOVE
fi
}