Last active
November 19, 2018 03:16
-
-
Save mimukit/248294cc9a6a6513dc130ba6474aedc2 to your computer and use it in GitHub Desktop.
My custom zsh configuration with oh-my-zsh, antigen, powerline9k theme & some useful plugins
This file contains hidden or 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 PATH="/usr/local/bin:$PATH" | |
source $HOME/.antigen.zsh | |
# Imports | |
POWERLEVEL9K_INSTALLATION_PATH=$ANTIGEN_BUNDLES/bhilburn/powerlevel9k | |
# Load the oh-my-zsh's library. | |
antigen use oh-my-zsh | |
# Install plugins from the default repo (robbyrussell's oh-my-zsh). | |
antigen bundle git | |
antigen bundle jump | |
antigen bundle yarn | |
antigen bundle command-not-found | |
# Install plugins form custom repo | |
#antigen bundle lukechilds/zsh-nvm | |
antigen bundle zsh-users/zsh-syntax-highlighting | |
antigen bundle zsh-users/zsh-autosuggestions | |
antigen bundle chrissicool/zsh-256color | |
# Load the theme. | |
# antigen theme robbyrussell | |
antigen theme bhilburn/powerlevel9k powerlevel9k | |
# Tell Antigen that you're done. | |
antigen apply | |
### VISUAL CUSTOMISATION ### | |
# Set nerdfont (https://github.com/ryanoasis/nerd-fonts) | |
POWERLEVEL9K_MODE='nerdfont-complete' | |
# Directory prompt setting | |
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2 | |
POWERLEVEL9K_SHORTEN_STRATEGY=truncate_folders | |
# Elements options of left prompt (remove the @username context) | |
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir rbenv vcs) | |
# Elements options of right prompt | |
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs history time) | |
# Add a second prompt line for the command | |
POWERLEVEL9K_PROMPT_ON_NEWLINE=true | |
# Add a space in the first prompt | |
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="%f" | |
# Visual customisation of the second prompt line | |
local user_symbol="$" | |
if [[ $(print -P "%#") =~ "#" ]]; then | |
user_symbol = "#" | |
fi | |
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="%{%B%F{black}%K{yellow}%} $user_symbol%{%b%f%k%F{yellow}%} %{%f%}" | |
# Change the git status to red when something isn't committed and pushed | |
POWERLEVEL9K_VCS_MODIFIED_BACKGROUND='red' | |
# Add a new line after the global prompt | |
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true | |
# Colorise the top Tabs of Iterm2 with the same color as background | |
# Just change the 18/26/33 wich are the rgb values | |
echo -e "\033]6;1;bg;red;brightness;18\a" | |
echo -e "\033]6;1;bg;green;brightness;26\a" | |
echo -e "\033]6;1;bg;blue;brightness;33\a" | |
# Autosuggestion color | |
export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=cyan" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment