2019-11-05 13:20:12 +01:00
|
|
|
# Path to your oh-my-zsh installation.
|
|
|
|
export ZSH="/home/jfm/.oh-my-zsh"
|
|
|
|
|
2019-11-07 13:59:16 +01:00
|
|
|
# THEME
|
2019-11-05 13:20:12 +01:00
|
|
|
ZSH_THEME="gallois"
|
|
|
|
|
2019-11-07 13:59:16 +01:00
|
|
|
# PLUGINS
|
2019-11-05 13:20:12 +01:00
|
|
|
plugins=(
|
|
|
|
git
|
|
|
|
docker
|
|
|
|
fzf
|
|
|
|
helm
|
2020-09-16 14:26:19 +02:00
|
|
|
pipenv
|
2019-11-05 13:20:12 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
source $ZSH/oh-my-zsh.sh
|
|
|
|
|
2019-11-07 13:59:16 +01:00
|
|
|
# CUSTOM SETTINGS
|
2019-11-05 13:20:12 +01:00
|
|
|
# PROMPT
|
2019-11-05 14:42:39 +01:00
|
|
|
autoload -U colors && colors
|
|
|
|
|
|
|
|
# Remove mode switching delay.
|
|
|
|
KEYTIMEOUT=5
|
|
|
|
|
|
|
|
# Change cursor shape for different vi modes.
|
|
|
|
function zle-keymap-select {
|
|
|
|
if [[ ${KEYMAP} == vicmd ]] ||
|
|
|
|
[[ $1 = 'block' ]]; then
|
|
|
|
PS1="%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%d%{$reset_color%}"$'\n'"%{$bg[cyan]$fg_bold[black]%} NORMAL %{$reset_color%} "
|
|
|
|
echo -ne '\e[1 q'
|
|
|
|
|
|
|
|
elif [[ ${KEYMAP} == main ]] ||
|
|
|
|
[[ ${KEYMAP} == viins ]] ||
|
|
|
|
[[ ${KEYMAP} = '' ]] ||
|
|
|
|
[[ $1 = 'beam' ]]; then
|
|
|
|
PS1="%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%d%{$reset_color%}"$'\n'"%{$bg[green]$fg_bold[black]%} INSERT %{$reset_color%} "
|
|
|
|
echo -ne '\e[5 q'
|
|
|
|
fi
|
|
|
|
zle reset-prompt
|
|
|
|
}
|
|
|
|
zle -N zle-keymap-select
|
|
|
|
|
|
|
|
# Use beam shape cursor on startup.
|
2020-09-16 14:26:19 +02:00
|
|
|
#PS1="%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%d%{$reset_color%}"$'\n'"%{$bg[green]$fg_bold[black]%} INSERT %{$reset_color%} "
|
|
|
|
PS1="%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%d%{$reset_color%}"$'\n'" "
|
2019-11-05 14:42:39 +01:00
|
|
|
echo -ne '\e[5 q'
|
|
|
|
|
|
|
|
# Use beam shape cursor for each new prompt.
|
|
|
|
preexec() {
|
|
|
|
echo -ne '\e[5 q'
|
|
|
|
}
|
2019-11-05 13:20:12 +01:00
|
|
|
|
|
|
|
# Preferred editor for local and remote sessions
|
|
|
|
if [[ -n $SSH_CONNECTION ]]; then
|
|
|
|
export EDITOR='vim'
|
|
|
|
else
|
|
|
|
export EDITOR='nvim'
|
|
|
|
fi
|
|
|
|
export M2_HOME=/home/jfm/Tools/apache-maven
|
|
|
|
export PATH=$PATH:$M2_HOME/bin:/home/jfm/Tools/openshift-origin-client/:/home/jfm/Tools/aws/:/home/jfm/Tools/spin/
|
|
|
|
export GIT_EDITOR=nvim
|
|
|
|
export VISUAL="nvim"
|
|
|
|
|
2020-09-16 14:26:19 +02:00
|
|
|
# BINDS
|
|
|
|
|
2019-11-05 13:20:12 +01:00
|
|
|
# Aliases
|
|
|
|
alias code="cd /home/jfm/Customers/TDC/Code/Onboarding"
|
|
|
|
alias ops="cd /home/jfm/Customers/TDC/Code/GitLab/ops"
|
|
|
|
alias onboarding="cd /home/jfm/Customers/TDC/Code/GitLab/onboarding"
|
|
|
|
alias mst="cd /home/jfm/Customers/TDC/Code/GitLab/onboarding/microservice-tools"
|
|
|
|
alias dotfiles="cd /home/jfm/Repositories/dotfiles"
|
|
|
|
alias tdc="cd /home/jfm/Customers/TDC"
|
|
|
|
|
|
|
|
alias top="htop"
|
|
|
|
alias ssh="TERM=xterm-256color ssh"
|
|
|
|
alias vim="nvim"
|
|
|
|
alias vi="nvim"
|
|
|
|
|
|
|
|
alias kubectx="/home/jfm/Repositories/GitHub/kubectx/kubectx"
|
|
|
|
|
2020-09-16 14:26:19 +02:00
|
|
|
alias vtmux="tmux split-window -d -v -p 40 && vim"
|
|
|
|
alias dtmux="tmux split-window -d -h -p 40 && vim"
|
|
|
|
alias ptmux="tmux split-window -d -h -p 40 \; split-window -d -t 2 -v -p 25 && vim"
|
|
|
|
alias ftmux="tmux split-window -d -h -p 40 \; split-window -d -t 2 -v -p 25 nnn && vim"
|
2019-11-05 13:20:12 +01:00
|
|
|
|
2020-09-16 14:26:19 +02:00
|
|
|
alias brewme="cd /home/jfm/Repositories/brewme-reports && ptmux"
|
2019-11-05 13:20:12 +01:00
|
|
|
|
2020-09-16 14:26:19 +02:00
|
|
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|