2018-02-01 22:34:24 +00:00
|
|
|
|
2019-01-11 18:13:34 +00:00
|
|
|
# load modules
|
2019-01-11 20:10:03 +00:00
|
|
|
bgnotify_threshold=0
|
|
|
|
for i in ~/.zsh/*/*.zsh; do
|
|
|
|
source "$i"
|
|
|
|
done
|
2019-01-11 19:59:58 +00:00
|
|
|
|
2019-01-11 20:10:03 +00:00
|
|
|
source ~/.zsh/omz/oh-my-zsh/lib/spectrum.zsh
|
|
|
|
source ~/.zsh/omz/oh-my-zsh/plugins/ssh-agent/ssh-agent.plugin.zsh
|
2019-01-11 19:59:58 +00:00
|
|
|
|
2019-05-26 15:03:46 +00:00
|
|
|
# vi key bindings
|
|
|
|
set -o vi
|
2018-02-01 22:34:24 +00:00
|
|
|
|
|
|
|
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
|
|
|
|
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=** r:|=**'
|
|
|
|
zstyle ':completion:*' max-errors 2
|
|
|
|
zstyle ':completion:*' menu select=1
|
|
|
|
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
|
2018-08-15 10:10:06 +00:00
|
|
|
zstyle :compinstall filename "${HOME}/.zshrc"
|
2018-02-01 22:34:24 +00:00
|
|
|
zstyle ':completion:*' rehash true
|
|
|
|
|
2018-05-19 17:39:06 +00:00
|
|
|
[[ $UID -eq 0 ]] || () {
|
|
|
|
local i
|
|
|
|
local -T SUDO_PATH sudo_path
|
|
|
|
local -U sudo_path
|
|
|
|
sudo_path=($path {,/usr{,/local}}/sbin(N-/))
|
|
|
|
for i in sudo{,x} su{,x}
|
|
|
|
do zstyle ":completion:*:$i:*" environ PATH="$SUDO_PATH"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2018-12-29 18:14:14 +00:00
|
|
|
autoload -Uz compinit && compinit
|
2018-05-19 17:39:06 +00:00
|
|
|
|
|
|
|
zstyle ':completion::complete:*' use-cache 1
|
2018-02-01 22:34:24 +00:00
|
|
|
# End of lines added by compinstall
|
|
|
|
# Lines configured by zsh-newuser-install
|
|
|
|
HISTFILE=~/.histfile
|
|
|
|
HISTSIZE=10000
|
|
|
|
SAVEHIST=10000
|
|
|
|
setopt appendhistory autocd notify
|
|
|
|
unsetopt beep
|
|
|
|
bindkey -e
|
|
|
|
# End of lines configured by zsh-newuser-install
|
|
|
|
|
2018-12-29 18:14:14 +00:00
|
|
|
# Prompt
|
|
|
|
autoload -U colors && colors
|
|
|
|
PROMPT="%B%{$FG[081]%}%n%{$reset_color%}%b%{$FG[245]%}@%{$reset_color%}%B%{$FG[206]%}%m%{$reset_color%}%b %{$fg[245]%}%B%c%b %(!.%{$FG[001]%}#.%{$FG[081]%}$)%{$reset_color%} "
|
|
|
|
|
|
|
|
|
2018-12-31 02:06:48 +00:00
|
|
|
# PATH
|
|
|
|
export PATH="$HOME/.local/bin:$PATH"
|
|
|
|
if which ruby > /dev/null 2>&1; then
|
|
|
|
export PATH="$PATH:$(ruby -e 'print Gem.user_dir')/bin"
|
|
|
|
fi
|
|
|
|
|
2018-02-02 16:12:44 +00:00
|
|
|
alias dots="git --git-dir=$HOME/.dots --work-tree=$HOME"
|
2019-06-12 09:45:42 +00:00
|
|
|
alias venv="source ~/.venv/bin/activate"
|
2018-09-10 10:25:43 +00:00
|
|
|
alias top="htop"
|
2018-09-27 20:42:23 +00:00
|
|
|
alias dotmodules="dots submodule update --recursive --remote"
|
2018-12-02 14:34:01 +00:00
|
|
|
alias ytdl="youtube-dl"
|
2019-05-02 00:25:22 +00:00
|
|
|
alias vi="nvim"
|
|
|
|
alias vim="nvim"
|
|
|
|
|
2019-05-22 00:18:19 +00:00
|
|
|
export FZF_DEFAULT_OPTS="-m --no-mouse"
|
2019-06-12 09:45:42 +00:00
|
|
|
export FZF_DEFAULT_COMMAND="find . -type f | sed 's|^\./||'"
|
2019-05-02 00:25:22 +00:00
|
|
|
|
2019-06-12 09:45:42 +00:00
|
|
|
alias s="vim ~/.local/bin/\$(stest -lx ~/.local/bin | fzf --tac -e)"
|
2019-05-02 00:25:22 +00:00
|
|
|
|
|
|
|
function start_tmux() {
|
|
|
|
if type tmux &> /dev/null; then
|
|
|
|
#if not inside a tmux session, and if no session is started, start a new session
|
|
|
|
if [[ -z "$TMUX" && -z $TERMINAL_CONTEXT ]]; then
|
|
|
|
(tmux -2 attach || tmux -2 new-session)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
2018-12-31 14:43:18 +00:00
|
|
|
|
|
|
|
[ -f ~/.zshrc.local ] && . ~/.zshrc.local
|
2019-06-23 16:49:02 +00:00
|
|
|
|
|
|
|
[ -f ~/.profile ] && . ~/.profile
|
|
|
|
|
|
|
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|