-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
61 lines (44 loc) · 1.84 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
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/adinvadim/.oh-my-zsh"
export JAVA_HOME=$(/usr/libexec/java_home)
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME=""
plugins=(git)
source $ZSH/oh-my-zsh.sh
fpath+=("$(brew --prefix)/share/zsh/site-functions")
autoload -U promptinit; promptinit
prompt pure
export PATH="${HOME}/.pyenv/shims:${PATH}"
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/platform-tools
lg() {
export LAZYGIT_NEW_DIR_FILE=~/.lazygit/newdir
lazygit "$@"
if [ -f $LAZYGIT_NEW_DIR_FILE ]; then
cd "$(cat $LAZYGIT_NEW_DIR_FILE)"
rm -f $LAZYGIT_NEW_DIR_FILE > /dev/null
fi
}
tmuxbu() {
# Check if the session exists, discarding output
# We can check $? for the exit status (zero for success, non-zero for failure)
tmux has-session -t "bu" 2>/dev/null
if [ $? != 0 ] ; then
tmux new-session -A -c '/Users/adinvadim/sandbox/bu/bu-frontend-v2/' -n 'frontend' -s 'bu' 'nvim; exec zsh' \; \
new-window -a -n 'backend' -c '/Users/adinvadim/sandbox/bu/bu-serverless/' 'nvim; exec zsh' \; \
new-window -a -n 'console' -c '/Users/adinvadim/sandbox/bu' \; \
split-window -h -c '/Users/adinvadim/sandbox/bu' \; \
new-window -a -n 'server' -c '/Users/adinvadim/sandbox/bu/bu-frontend-v2' \; \
split-window -h -c '/Users/adinvadim/sandbox/bu/bu-serverless' \; \
new-window -a -n 'mobile' -c '/Users/adinvadim/sandbox/bu/bu-mobile' \; \
new-window -a -n 'email' -c '/Users/adinvadim/sandbox/bu/bu-email' \; \
set-option -t "frontend" remain-on-exit on \; \
set-option -t "backend" remain-on-exit on \;
else
tmux attach-session -t "bu"
fi
}
alias tmxbu="tmuxbu"