-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
101 lines (74 loc) · 3.54 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
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="imajes"
DEFAULT_USER=$USER
# Oh My Zsh Plugins
plugins=(git emacs ssh-agent brew colored-man-pages node)
source $ZSH/oh-my-zsh.sh
# Lang and editor
export LANG="en_US.UTF-8"
export EDITOR="emacsclient"
# Compilation flags
export GYP_DEFINES="component=shared_library target_arch=x64 dcheck_always_on=1"
export LDFLAGS="-L/usr/local/opt/libffi/lib:$LDFLAGS"
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH"
export ICECC_CLANG_REMOTE_CPP=1
export ICECC_SCHEDULER_HOST="10.40.135.27";
export ICECC_NETNAME=IceWro
export CCACHE_SLOPPINESS=time_macros,include_file_mtime,file_macro
export CCACHE_CPP2=yes
export CCACHE_MAXSIZE=40G
export PATH=$PATH:/Users/shfx/Projects/depot_tool
# ssh
export SSH_KEY_PATH="$HOME/.ssh/rsa_id"
# Work dir
WORK_PATH="$HOME/Projects/work"
WORK_DEV_PATH="$HOME/Projects/work-dev"
alias stable="cd $WORK_PATH"
alias dev="cd $WORK_DEV_PATH"
function gnn () {
echo $CCACHE_PREFIX
if [[ "$PWD" = "$WORK_PATH" ]]; then
echo "GN STABLE"
desktop/gn_opera.py --ccache --release --force ffmpeg_use_atomics_fallback=true enable_precompiled_headers=false enable_pack_verification=false product=\"gx\"
elif [[ "$PWD" = "$WORK_DEV_PATH" ]]; then
echo "GN DEV"
desktop/gn_opera.py --ccache --release --force ffmpeg_use_atomics_fallback=true enable_precompiled_headers=false enable_pack_verification=false product=\"gx\"
else
echo "wrong directory"
fi
}
function nj () {
export ICECC_VERSION=`$HOME/Projects/icecream-chromium-mac/geticeccversion.sh $HOME/Projects/work/chromium/src`
if [[ "$PWD" = "$WORK_PATH" ]]; then
echo "Building STABLE branch"
ninja -C $WORK_PATH/chromium/src/out/Release opera
elif [[ "$PWD" = "$WORK_DEV_PATH" ]]; then
echo "Building DEV branch"
ninja -C $WORK_DEV_PATH/chromium/src/out/Release opera
else
echo "wrong directory"
fi
}
function o () {
if [[ "$PWD" = "$WORK_PATH" ]]; then
$WORK_PATH/chromium/src/out/Release/Opera.app/Contents/MacOS/Opera --webui-debug-mode=live --disable-update --show-component-extension-options --show-component-extension-with-background-pages --user-data-dir=$HOME/Projects/clean-profile
elif [[ "$PWD" = "$WORK_DEV_PATH" ]]; then
$WORK_DEV_PATH/chromium/src/out/Release/Opera.app/Contents/MacOS/Opera --webui-debug-mode=live --disable-update --show-component-extension-options --show-component-extension-with-background-pages --user-data-dir=$HOME/Projects/clean-profile --gx-test-server
else
echo "wrong directory"
fi
}
alias tt="npm start --prefix $WORK_PATH/desktop/common/resources/shared/toolkit/"
alias up="git submodule update $WORK_PATH/chromium/src"
alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# tabtab source for electron-forge package
# uninstall by removing these lines or running `tabtab uninstall electron-forge`
[[ -f /Users/opera_user/.config/yarn/global/node_modules/tabtab/.completions/electron-forge.zsh ]] && . /Users/opera_user/.config/yarn/global/node_modules/tabtab/.completions/electron-forge.zsh
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
PURE_GIT_UNTRACKED_DIRTY=0
autoload -U promptinit; promptinit
prompt pure