forked from mpanarin/.dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
executable file
·143 lines (114 loc) · 3.32 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Path to oh-my-zsh installation.
export ZSH=~/.oh-my-zsh
# Name of the theme to load.
ZSH_THEME="spaceship"
# Display red dots whilst waiting for completion.
COMPLETION_WAITING_DOTS="true"
plugins=(git python vi-mode django docker extract lol mix pip elixir poetry)
source $ZSH/oh-my-zsh.sh
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='nano'
else
export EDITOR='nvim'
fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
export SSH_KEY_PATH="~/.ssh/rsa_id"
# TMUX startup
source ~/.gem/ruby/2.6.0/gems/tmuxinator-0.15.0/completion/tmuxinator.zsh
ZSH_TMUX_AUTOSTART=false
eval $(~/tmux_get_startup_command)
powerline-config tmux setup
# Spaceship theme customization
SPACESHIP_USER_SHOW=false
SPACESHIP_HG_SHOW=false
SPACESHIP_HG_STATUS_SHOW=false
SPACESHIP_PACKAGE_SHOW=false
SPACESHIP_NODE_SHOW=false
SPACESHIP_RUBY_SHOW=false
SPACESHIP_XCODE_SHOW_LOCAL=false
SPACESHIP_XCODE_SHOW_GLOBAL=false
SPACESHIP_SWIFT_SHOW_LOCAL=false
SPACESHIP_GOLANG_SHOW=false
SPACESHIP_PHP_SHOW=false
SPACESHIP_RUST_SHOW=false
SPACESHIP_HASKELL_SHOW=false
SPACESHIP_JULIA_SHOW=false
SPACESHIP_AWS_SHOW=false
SPACESHIP_DOTNET_SHOW=false
SPACESHIP_EMBER_SHOW=false
SPACESHIP_KUBECONTEXT_SHOW=false
SPACESHIP_BATTERY_SHOW=false
SPACESHIP_DOCKER_SHOW=false
# Enable zsh autosuggestions
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
ZSH_AUTOSUGGEST_USE_ASYNC=1
ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=30
ZSH_AUTOSUGGEST_STRATEGY=match_prev_cmd
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=0'
bindkey '^ ' autosuggest-accept
# Enable zsh syntax highlight
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# VIRTUALENV WRAPPER STUFFS
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python
source /usr/bin/virtualenvwrapper.sh
# Enable fzf
export FZF_TMUX=1
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# added by pipsi (https://github.com/mitsuhiko/pipsi)
export PATH="/home/m-panarin/.local/bin:$PATH"
# Poetry
export PATH="$PATH:/home/$USER/.poetry/bin"
# Python startup
export PYTHONSTARTUP="$(python -m jedi repl)"
# asdf-vm configs
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
# Aliases
alias gdt='git difftool'
alias estat='systemctl status --user emacs.service'
alias estart='systemctl start --user emacs.service'
alias estop='systemctl stop --user emacs.service'
alias elog='journalctl -u emacs.service --since today'
alias doco=docker-compose
alias doco_rebuild='doco down -v && doco up --build'
alias doco_log='docker-compose logs'
function omae_wa_mou_shindeiru() {
echo 'NANI?!'
sleep 1
if [ -z "$1" ]
then
systemctl poweroff -i
else
pkill $1
fi
}
function tnew() {
if [ -z "$1" ]
then
name=""
else
name=" -s $1"
fi
tmux detach-client -t /dev/pts/1 -E "tmux new $name"
}
function tatt() {
if [ -z "$1" ]
then
name=""
else
name=" -t $1"
fi
tmux detach-client -t /dev/pts/1 -E "tmux attach $name"
}
alias vim='nvim'
alias gsubsi='g submodule init && g submodule sync && g submodule update'
alias gsubi='g submodule update --init'
alias xa='exa -lh --git'
alias xat='exa -lTh --git'
alias ezsh='nvim ~/.zshrc && source ~/.zshrc'
alias tkill='tmux kill-session -t'
source /home/m-panarin/.local/share/dephell/_dephell_zsh_autocomplete