-
Notifications
You must be signed in to change notification settings - Fork 1
/
dot_zshrc
125 lines (105 loc) · 6.06 KB
/
dot_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
# Q pre block. Keep at the top of this file.
[[ -f "${HOME}/Library/Application Support/amazon-q/shell/zshrc.pre.zsh" ]] && builtin source "${HOME}/Library/Application Support/amazon-q/shell/zshrc.pre.zsh"
#Fig pre block. Keep at the top of this file.
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
export EDITOR=vim
export VISUAL="$EDITOR"
export MYVIMRC="~/.local/share/chezmoi/dot_vim/"
export PATH="$PATH:./node_modules/.bin/"
# Hash
# hash -d down=~/Downloads
curl -fLo ~/.local/share/chezmoi/dot_vim/autoload/plug.vim --create-dirs \
https://github.com/raw/junegunn/vim-plug/master/plug.vim
source /Users/maxdzyubak/.ghcup/env
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME=""
if [ -d "/opt/homebrew/opt/ruby/bin" ]; then
export PATH=/opt/homebrew/opt/ruby/bin:$PATH
export PATH=`gem environment gemdir`/bin:$PATH
fi
if [ -d "/usr/local/opt/ruby/bin" ]; then
export PATH=/usr/local/opt/ruby/bin:$PATH
export PATH=`gem environment gemdir`/bin:$PATH
fi
plugins=(vi-mode git frontend-search fzf aliases react-native ruby iterm2 node npm rails redis-cli thefuck zsh-navigation-tools zsh-interactive-cd wd z web-search gulp gitignore gitfast asdf)
source $ZSH/oh-my-zsh.sh
if (( ! ${fpath[(I)/usr/local/share/zsh/site-functions]} )); then
FPATH=/usr/local/share/zsh/site-functions:$FPATH
fi
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
# bat
export BAT_THEME="gruvbox-dark"
# Aliases
alias cpwd="pwd|pbcopy"
alias pc="pbcopy"
alias cc="chezmoi cd"
alias a="code --add"
alias o="open"
alias or="open -R"
alias oc="code"
alias t="touch"
alias tx="tmux"
alias md="mkdir"
alias cdu="rsync --archive"
alias cr="cp -R"
alias rd="rmdir"
alias rf="rm -rf"
alias f="fzf"
alias b="bat"
alias k="exa --tree --level=1 --group-directories-first --all --icons --long --color auto"
alias kk="exa --tree --level=2 --group-directories-first --all --icons --long --color auto"
alias kkk="exa --tree --level=3 --group-directories-first --all --icons --long --color auto"
alias ks="exa --all --group-directories-first --icons --grid --color auto"
alias kd="exa --all --only-dirs --icons --color auto"
alias kdt="exa --tree --level=1 --all --only-dirs --icons"
alias kt="exa --tree --all --icons"
alias k2="exa --tree --level=2 --all --icons"
alias k3="exa --tree --level=3 --all --icons"
alias k4="exa --tree --level=4 --all --icons"
alias kr="exa --tree --level=1 --reverse --all --icons"
alias ff="fig run gc"
alias fc="fig run commit-m"
alias fcc="fig run commit"
alias fac="fig run add-all-and-commit-message"
alias fs="fig run lsd"
alias fa="fig run lsd-a"
alias ft="fig run lsd-tree"
alias ovc="vim /Users/maxdzyubak/.vim/vimrc"
alias ozc="vim /Users/maxdzyubak/.zshrc"
alias otc="vim /Users/maxdzyubak/.config/tmux/tmux.conf"
alias cdvscc="cd /Users/maxdzyubak/Library/Application\ Support/Code/User"
alias cavc="chezmoi add /Users/maxdzyubak/.vim/vimrc ; cd /Users/maxdzyubak/.local/share/chezmoi"
alias cazc="chezmoi add /Users/maxdzyubak/.zshrc ; cd /Users/maxdzyubak/.local/share/chezmoi"
# chezmoi add vimrc, .zshrc, tmux.conf.local, karabiner.json, Code/User/settings.json, Code/User/keybindings.json & chezmoi cd & git add every tools in index & git commit every tools with message 'Update nametools' & git push origin -u main & cd
alias cu="chezmoi add /Users/maxdzyubak/.bashrc ; chezmoi add /Users/maxdzyubak/.vim/vimrc ; chezmoi add /Users/maxdzyubak/.zshrc ; chezmoi add /Users/maxdzyubak/.config/tmux/tmux.conf.local ; chezmoi add /Users/maxdzyubak/.fig/settings.json ; chezmoi add /Users/maxdzyubak/.config/karabiner/karabiner.json ; chezmoi add /Users/maxdzyubak/Library/Application\ Support/Code/User/settings.json ; chezmoi add /Users/maxdzyubak/Library/Application\ Support/Code/User/keybindings.json ; cd /Users/maxdzyubak/.local/share/chezmoi ; git add /Users/maxdzyubak/.local/share/chezmoi/dot_bashrc ; git add /Users/maxdzyubak/.local/share/chezmoi/dot_vim/vimrc ; git commit -m 'Update vimrc' ; git add /Users/maxdzyubak/.local/share/chezmoi/dot_zshrc; git commit -m 'Update .zshrc' ; git add /Users/maxdzyubak/.local/share/chezmoi/dot_fig/settings.json ; git commit -m 'Update fig settings.json' ; git add /Users/maxdzyubak/.local/share/chezmoi/dot_config/tmux/tmux.conf.local; git commit -m 'Update tmux.conf.local' ; git add /Users/maxdzyubak/.local/share/chezmoi/dot_config/private_karabiner/private_karabiner.json ; git commit -m 'Update karabiner.json' ; git add private_Library/private_Application\ Support/private_Code/User/settings.json ; git commit -m 'Update settings.json vscode' ; git add private_Library/private_Application\ Support/private_Code/User/keybindings.json ; git commit -m 'Update keybindings.json vscode' ; git push origin -u main ; cd"
alias gph="cd /Users/maxdzyubak/hub ; git add . ; git commit -m 'Update' ; git push origin -u main ; cd"
# fast start my new project in github with hub tools
alias gcnph="git init ; echo 'Start my awesome project' >> README.md ; git add . ; git commit -m 'Initial commit' ; hub create ; git push -u origin main"
alias ca="chezmoi add"
alias v="vim"
alias fd="fd -gHl"
alias ip="dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com"
alias rc="rubocop"
alias r="ruby"
alias res="source ~/.zshrc"
alias i="imgcat"
alias fzd="find . -type d | fzf"
alias fzh="history | fzf"
# git-radar settings
export PROMPT="$PROMPT\$(git-radar --zsh --fetch) "
export GIT_RADAR_FORMAT="%{stash}%{remote}%{local}%{changes}"
export GIT_RADAR_FETCH_TIME=20
export GIT_RADAR_COLOR_CHANGES_UNTRACKED="$fg[red]"
TYPEWRITTEN_PROMPT_LAYOUT="pure"
TYPEWRITTEN_SYMBOL="->"
TYPEWRITTEN_ARROW_SYMBOL="➜"
TYPEWRITTEN_CURSOR="terminal"
# Set typewritten ZSH as a prompt
autoload -U promptinit; promptinit
prompt typewritten
eval "$(zoxide init zsh)"
export PATH="/usr/local/opt/postgresql@15/bin:$PATH"
[[ -f "$HOME/fig-export/dotfiles/dotfile.zsh" ]] && builtin source "$HOME/fig-export/dotfiles/dotfile.zsh"
# 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"