Last active
May 12, 2022 00:40
-
-
Save taking/1a03b19d580dda6376300d865b19b443 to your computer and use it in GitHub Desktop.
My zshrc
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
# If you come from bash you might have to change your $PATH. | |
export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH=/Users/$USER/.oh-my-zsh | |
DEFAULT_USER="$USER" | |
ZSH_THEME="agnoster" | |
# Uncomment the following line to disable bi-weekly auto-update checks. | |
DISABLE_AUTO_UPDATE="true" | |
DISABLE_UPDATE_PROMPT="true" | |
# Which plugins would you like to load? (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) | |
plugins=(git zsh-syntax-highlighthing zsh-autosuggestions alias-tips) | |
source $ZSH/oh-my-zsh.sh | |
# 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" | |
alias dc='cd' | |
alias cls="clear" | |
alias pip3="python3 -m pip" | |
alias terminal-rec="asciinema rec" | |
alias trash_clean="rm -rf ~/.Trash" | |
alias fsize='du -hsx * | sort -rh | head -n 10' | |
alias top2="glances" | |
alias youd="youtube-dl -ci -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' -o '%(title)s - (%(upload_date)s %(height)sP %(uploader)s).%(ext)s'" | |
alias youd4k="youtube-dl -f "bestvideo+bestaudio" --merge-output-format "mkv" -o '%(title)s - (%(upload_date)s %(height)sP %(uploader)s).%(ext)s'" | |
HISTTIMEFORMAT="[%d.%m.%y] %T " | |
export HISTSIZE=10000 | |
export HISTTIMEFORMAT | |
# NeoVim settings | |
export EDITOR=/usr/local/bin/nvim | |
alias vi="nvim" | |
alias vim="nvim" | |
alias vimdiff="nvim -d" | |
# Development Environments | |
export PATH="/usr/local/miniconda3/bin:$PATH" | |
function fzfpw() { | |
fzf --preview '[[ $(file --mime {}) =~ binary ]] && | |
echo {} is a binary file || | |
(highlight -O ansi -l {} || | |
coderay {} || | |
rougify {} || | |
cat {}) 2> /dev/null | head -500' | |
} |
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
export ZSH=$HOME/.oh-my-zsh | |
DEFAULT_USER="$USER" | |
ZSH_THEME="agnoster" | |
# Uncomment the following line to disable bi-weekly auto-update checks. | |
DISABLE_AUTO_UPDATE="true" | |
DISABLE_UPDATE_PROMPT="true" | |
plugins=(git zsh-syntax-highlighting zsh-autosuggestions alias-tips) | |
source $ZSH/oh-my-zsh.sh | |
alias dc='cd' | |
alias cls='clear' | |
alias rm='rm -i' | |
alias cp='cp -i' | |
alias mv='mv -i' | |
alias ll='ls -lh' | |
alias fsize='du -hsx * | sort -rh | head -n 10' | |
# NeoVim settings | |
# export EDITOR=/bin/nvim | |
alias vi="nvim" | |
alias vim="nvim" | |
alias vimdiff="nvim -d" | |
HISTTIMEFORMAT="[%d.%m.%y] %T " | |
export HISTSIZE=10000 | |
export HISTTIMEFORMAT | |
# Git Username/Email | |
git config --global user.name "taking" | |
git config --global user.email "consine2@gmail.com" | |
# Git Logs | |
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" | |
git config --global alias.lga "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --all" | |
case $TERM in (xterm*) | |
bindkey "^[OH" beginning-of-line | |
bindkey "^[OF" end-of-line | |
esac |
~/.oh-my-zsh/themes/agnoster.zsh-theme
## Main prompt
build_prompt() {
RETVAL=$?
prompt_status
prompt_virtualenv
prompt_aws
prompt_context
prompt_dir
prompt_git
prompt_bzr
prompt_hg
prompt_newline
prompt_end
}
PROMPT='%{%f%b%k%}$(build_prompt) '
prompt_newline() {
if [[ -n $CURRENT_BG ]]; then
echo -n "%{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR
%{%k%F{blue}%}$SEGMENT_SEPARATOR"
else
echo -n "%{%k%}"
fi
echo -n "%{%f%}"
CURRENT_BG=''
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Plugin Install