Last active
March 19, 2020 11:52
-
-
Save saber-nyan/5bae474efdd38540c3424b1180ea62a0 to your computer and use it in GitHub Desktop.
10/10 Z-Shell config!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Path to your oh-my-zsh installation. | |
export ZSH="/home/${USER}/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
#ZSH_THEME="bira" | |
ZSH_THEME="mortalscumbag" | |
#ZSH_THEME="trapd00r" | |
# Set list of themes to pick from when loading at random | |
# Setting this variable when ZSH_THEME=random will cause zsh to load | |
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/ | |
# If set to an empty array, this variable will have no effect. | |
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) | |
# Uncomment the following line to use case-sensitive completion. | |
# CASE_SENSITIVE="true" | |
# Uncomment the following line to use hyphen-insensitive completion. | |
# Case-sensitive completion must be off. _ and - will be interchangeable. | |
HYPHEN_INSENSITIVE="true" | |
# Uncomment the following line to disable bi-weekly auto-update checks. | |
DISABLE_AUTO_UPDATE="true" | |
# Uncomment the following line to change how often to auto-update (in days). | |
# export UPDATE_ZSH_DAYS=13 | |
# Uncomment the following line to disable colors in ls. | |
# DISABLE_LS_COLORS="true" | |
# Uncomment the following line to disable auto-setting terminal title. | |
# DISABLE_AUTO_TITLE="true" | |
# Uncomment the following line to enable command auto-correction. | |
ENABLE_CORRECTION="true" | |
# Uncomment the following line to display red dots whilst waiting for completion. | |
# COMPLETION_WAITING_DOTS="true" | |
# Uncomment the following line if you want to disable marking untracked files | |
# under VCS as dirty. This makes repository status check for large repositories | |
# much, much faster. | |
DISABLE_UNTRACKED_FILES_DIRTY="true" | |
# Uncomment the following line if you want to change the command execution time | |
# stamp shown in the history command output. | |
# You can set one of the optional three formats: | |
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" | |
# or set a custom format using the strftime function format specifications, | |
# see 'man strftime' for details. | |
# HIST_STAMPS="mm/dd/yyyy" | |
# Would you like to use another custom folder than $ZSH/custom? | |
# ZSH_CUSTOM=/path/to/new-custom-folder | |
# Which plugins would you like to load? | |
# Standard plugins can be found in ~/.oh-my-zsh/plugins/* | |
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ | |
# Example format: plugins=(rails git textmate ruby lighthouse) | |
# Add wisely, as too many plugins slow down shell startup. | |
plugins=( | |
git archlinux colored-man-pages common-aliases cp django docker extract | |
docker-compose gnu-utils gradle httpie nmap pip themes virtualenv | |
) | |
source $ZSH/oh-my-zsh.sh | |
# User configuration | |
# export MANPATH="/usr/local/man:$MANPATH" | |
# You may need to manually set your language environment | |
#export LANG=en_US.UTF-8 | |
# Preferred editor for local and remote sessions | |
# if [[ -n $SSH_CONNECTION ]]; then | |
# export EDITOR='vim' | |
# else | |
# export EDITOR='mvim' | |
# fi | |
# Compilation flags | |
# export ARCHFLAGS="-arch x86_64" | |
# ssh | |
# export SSH_KEY_PATH="~/.ssh/rsa_id" | |
# Set personal aliases, overriding those provided by oh-my-zsh libs, | |
# plugins, and themes. Aliases can be placed here, though oh-my-zsh | |
# users are encouraged to define aliases within the ZSH_CUSTOM folder. | |
# For a full list of active aliases, run `alias`. | |
# | |
# Example aliases | |
# alias zshconfig="mate ~/.zshrc" | |
# alias ohmyzsh="mate ~/.oh-my-zsh" | |
[[ $- != *i* ]] && return | |
export CFLAGS="-march=native -O2 -pipe -fno-stack-protector -fomit-frame-pointer -fno-plt" | |
export CXXFLAGS="${CFLAGS}" | |
export LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" | |
export MAKEFLAGS="-j4" | |
export EDITOR="nano" | |
export DIFFPROG="colordiff -d" | |
export PAGER="less -r" | |
#PATH="$PATH:$(ruby -e 'print Gem.user_dir')/bin" | |
#export GEM_HOME=$HOME/.gem | |
export PATH="$PATH:/home/$USER/.local/bin/" | |
export CODESTATS_API_KEY="SFMyNTY.YzJGaVpYSXRibmxoYmc9PSMjTXpjMU5RPT0.j8So2fb1BMzGUoPX8FV9qajUiwDlwuQK6-FddYNl5co" | |
# The following lines were added by compinstall | |
autoload -U colors colors | |
zstyle ':completion:*' completer _expand _complete _ignored _match _correct _approximate _prefix | |
zstyle ':completion:*' completions 1 | |
zstyle ':completion:*' expand prefix suffix | |
zstyle ':completion:*' file-sort name | |
zstyle ':completion:*' format '%F{cyan}Completing %F{red}%d%f:' | |
zstyle ':completion:*' glob 1 | |
zstyle ':completion:*' group-name '' | |
zstyle ':completion:*' list-colors '' | |
zstyle ':completion:*' list-prompt %S%l: Hit TAB for more, or the character to insert%s | |
zstyle ':completion:*' list-suffixes true | |
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=** r:|=**' 'l:|=* r:|=*' | |
zstyle ':completion:*' match-original both | |
zstyle ':completion:*' max-errors 2 | |
zstyle ':completion:*' menu select=1 | |
zstyle ':completion:*' original true | |
zstyle ':completion:*' preserve-prefix '//[^/]##/' | |
zstyle ':completion:*' prompt '%F{red}Found %e errors!%f' | |
zstyle ':completion:*' select-prompt '%SCompletion active (%l)...%s' | |
zstyle ':completion:*' substitute 1 | |
zstyle ':completion:*' verbose true | |
zstyle ':completion:*' rehash true | |
zstyle :compinstall filename '/root/.zshrc' | |
SPROMPT="%F{red}Fix %F{cyan}%R%F{red} -> %F{cyan}%r%F{red}? %F{cyan}<(Y)es/(N)o/(E)dit/(A)bort>%f " | |
autoload -Uz compinit | |
compinit | |
# End of lines added by compinstall | |
# Lines configured by zsh-newuser-install | |
HISTFILE=~/.histfile | |
HISTSIZE=10000 | |
SAVEHIST=15000 | |
setopt appendhistory inc_append_history sharehistory hist_ignore_all_dups | |
setopt hist_reduce_blanks nonomatch noflowcontrol checkjobs longlistjobs | |
setopt beep extendedglob notify interactive_comments autocd hash_list_all | |
setopt correct_all | |
unsetopt notify BG_NICE | |
bindkey -e | |
# End of lines configured by zsh-newuser-install | |
## NVM (Node Version Manager) | |
export NVM_DIR="$HOME/.nvm" # You can change this if you want. | |
export NVM_SOURCE="/usr/share/nvm" # The AUR package installs it to here. | |
[[ -s "$NVM_SOURCE/nvm.sh" ]] && . "$NVM_SOURCE/nvm.sh" # Load NVM | |
[[ -x ~/code-stats-zsh/codestats.plugin.zsh ]] && source ~/code-stats-zsh/codestats.plugin.zsh | |
if [[ -e /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]]; then | |
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | |
fi | |
[[ -x /usr/bin/lesspipe.sh ]] && eval "$(lesspipe.sh)" | |
alias s="sudo" | |
alias ll="ls -al --classify --color --human-readable --group-directories-first" | |
alias killall="killall --interactive --verbose" | |
alias cp="rsync -avhP" | |
alias free="free -hw" | |
alias history-count='history | cut -d'\'' '\'' -f4- | cut -d'\'' '\'' -f1 | sort | uniq -c | sort -n | tail -11 | head -10' | |
## Kawaii expanding | |
expand-or-complete-with-dots() { | |
echo -n "\e[31m .::loading::. \e[0m" | |
zle expand-or-complete | |
zle redisplay | |
} | |
zle -N expand-or-complete-with-dots | |
## Kawaii binds | |
bindkey '^[[A' up-line-or-search # up arrow : backward history search | |
bindkey '^[[B' down-line-or-search # down arrow : forward history search | |
bindkey ';5D' backward-word # ctrl+left : backward word | |
bindkey ';5C' forward-word # ctrl+right : forward word | |
bindkey '\e[1~' beginning-of-line # home : line beginning | |
bindkey '\e[2~' overwrite-mode # insert : toggle typing mode | |
bindkey '\e[3~' delete-char # del : as always, delete char after carriage | |
bindkey '\e[4~' end-of-line # end : line ending | |
bindkey '\e[5~' up-line-or-history # page-up : as bash`s 'arrow up' | |
bindkey '\e[6~' down-line-or-history # page-down : as bash`s 'arrow down' | |
bindkey "^I" expand-or-complete-with-dots # tab : kawaii (as fuck) expanding | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" | |
echo | |
neofetch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment