configuration/zshrc

81 lines
2.6 KiB
Bash
Raw Normal View History

2014-11-27 20:52:06 +01:00
# Lines configured by zsh-newuser-install
2016-03-16 23:54:53 +01:00
HISTFILE=~/.local/share/zsh/histfile
2014-11-27 20:52:06 +01:00
HISTSIZE=1000
SAVEHIST=1000
setopt appendhistory
unsetopt beep
bindkey -v
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
2016-09-21 17:21:42 +02:00
zstyle :compinstall filename '/home/noctua/.zshrc'
2014-11-27 20:52:06 +01:00
autoload -Uz compinit
compinit
# End of lines added by compinstall
# Get ourselves a nice prompt.
git_status() {
if git status 2>/dev/null 1>&2; then
git branch | grep \*
git status --porcelain | cat <(echo OK) - | sed 's/\(..\).*/(\1)/' | tail -1
fi
}
autoload -U colors && colors
PS1="[%*] %{$fg[red]%}%n@%m%{$reset_color%} %{$fg[green]%}%~%{$reset_color%} "'$(git_status | xargs echo)'"
2014-11-27 20:52:06 +01:00
%(?.$.%%) "; setopt promptsubst
2016-03-29 13:24:14 +02:00
# Loading fizsh
source "$HOME/.config/zsh/zsh-history-substring-search.zsh"
zmodload zsh/terminfo
bindkey "$terminfo[kcuu1]" history-substring-search-up
bindkey "$terminfo[kcud1]" history-substring-search-down
setopt HIST_FIND_NO_DUPS
2014-11-27 20:52:06 +01:00
# Color ls
2016-12-02 14:45:16 +01:00
alias ls="lr -1FG"
2014-11-27 20:52:06 +01:00
2016-06-28 09:40:07 +02:00
# No need for less history and more
alias less="LESSHISTFILE=- less"
alias more="less"
2016-09-21 17:21:42 +02:00
# There is only one vim
2016-03-16 23:54:53 +01:00
alias vim="nvim"
2015-12-30 01:30:14 +01:00
alias vi="nvim"
alias nano="nvim"
2014-11-27 20:52:06 +01:00
2016-09-21 17:21:42 +02:00
# Ready for ssh'ing
alias agent='eval "$(ssh-agent)" && ssh-add'
2015-05-04 20:23:46 +02:00
2016-11-22 11:41:51 +01:00
# Cloning my terminal
alias copy='urxvtc'
2016-12-20 15:04:50 +01:00
# FZF
function go() {
2017-01-03 15:36:06 +01:00
dir="$(lr /home /data /etc -L -t '(name ~~ "\.*" && prune || print) && type = d && !(name = ".git")' | fzf)"
2016-12-20 15:04:50 +01:00
[ -n "$dir" ] && cd "$dir" || false
}
2015-05-04 20:23:46 +02:00
# Base16 Shell
BASE16_SHELL="$HOME/.config/base16-shell/base16-greenscreen.dark.sh"
2015-05-04 20:23:46 +02:00
BASE16_SHELL="$HOME/.config/base16-shell/base16-3024.dark.sh"
BASE16_SHELL="$HOME/.config/base16-shell/base16-solarized.dark.sh"
BASE16_SHELL="$HOME/.config/base16-shell/base16-shapeshifter.dark.sh"
BASE16_SHELL="$HOME/.config/base16-shell/base16-railscasts.dark.sh"
BASE16_SHELL="$HOME/.config/base16-shell/base16-monokai.dark.sh"
BASE16_SHELL="$HOME/.config/base16-shell/base16-marrakesh.dark.sh"
BASE16_SHELL="$HOME/.config/base16-shell/base16-harmonic16.dark.sh"
BASE16_SHELL="$HOME/.config/base16-shell/base16-default.dark.sh"
BASE16_SHELL="$HOME/.config/base16-shell/base16-colors.dark.sh"
BASE16_SHELL="$HOME/.config/base16-shell/base16-chalk.dark.sh"
BASE16_SHELL="$HOME/.config/base16-shell/base16-atelierseaside.dark.sh"
BASE16_SHELL="$HOME/.config/base16-shell/base16-atelierlakeside.dark.sh"
BASE16_SHELL="$HOME/.config/base16-shell/base16-atelierforest.dark.sh"
BASE16_SHELL="$HOME/.config/base16-shell/base16-atelierdune.dark.sh"
BASE16_SHELL="$HOME/.config/base16-shell/base16-brewer.dark.sh"
# Also modify: https://github.com/chriskempson/base16-xresources
2015-05-04 20:23:46 +02:00
[[ -s $BASE16_SHELL ]] && source $BASE16_SHELL
2015-12-19 17:51:59 +01:00