diff options
author | Jakob Stendahl <jakobste@uio.no> | 2020-08-27 09:16:27 +0200 |
---|---|---|
committer | Jakob Stendahl <jakobste@uio.no> | 2020-08-27 09:16:27 +0200 |
commit | 67c181b213519205fe0e7bac4646349652835dbb (patch) | |
tree | e6986d8761e0f6fbfce7e92916679c1d284bf61f /linux/zshrc | |
parent | 80985a3f817074537bb5d997fc4923294a0c3993 (diff) | |
download | dotfiles-67c181b213519205fe0e7bac4646349652835dbb.tar.gz dotfiles-67c181b213519205fe0e7bac4646349652835dbb.zip |
Update to p10k, and do some small updates
Diffstat (limited to 'linux/zshrc')
-rw-r--r-- | linux/zshrc | 84 |
1 files changed, 40 insertions, 44 deletions
diff --git a/linux/zshrc b/linux/zshrc index e6c60fd..d43b59d 100644 --- a/linux/zshrc +++ b/linux/zshrc @@ -1,60 +1,56 @@ # If you come from bash you might have to change your $PATH. # export PATH=$HOME/bin:/usr/local/bin:$PATH -export ZSH="/home/jakob/.oh-my-zsh" +# Check if env setup file exists +if [ ! -f /usr/local/etc/zsh_env_setup ]; then + echo "export ZSH=$HOME/.oh-my-zsh" > /usr/local/etc/zsh_env_setup + echo "DEFAULT_USER=$USER" >> /usr/local/etc/zsh_env_setup +fi -ZSH_THEME="powerlevel9k/powerlevel9k" +# Source env setup file +source /usr/local/etc/zsh_env_setup -export UPDATE_ZSH_DAYS=30 - -# Uncomment the following line to enable command auto-correction. -# ENABLE_CORRECTION="true" +# Source powerlevel10k theme +ZSH_THEME="powerlevel10k/powerlevel10k" COMPLETION_WAITING_DOTS="true" +# Setup plugins plugins=( git zsh-autosuggestions zsh-syntax-highlighting ) +# Setup oh-my-zsh source $ZSH/oh-my-zsh.sh -# User configuration - -# You may need to manually set your language environment -# export LANG=en_US.UTF-8 -DEFAULT_USER="jakob" - -# POWERLINE9K -POWERLEVEL9K_MODE="nerdfont-complete" - -POWERLINE9K_PROMPT_ADD_NEWLINE=true - -POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir vcs) -POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs) - -POWERLEVEL9K_SHORTEN_STRATERGY="truncate_to_last" -POWERLEVEL9K_SHORTEN_DIR_LENGTH=2 -POWERLEVEL9K_DIR_SHOW_WRITABLE=true - -# Powerline color config -POWERLEVEL9K_STATUS_OK_BACKGROUND='004' -POWERLEVEL9K_STATUS_OK_FOREGROUND='015' -POWERLEVEL9K_STATUS_ERROR_BACKGROUND='001' -POWERLEVEL9K_STATUS_ERROR_FOREGROUND='015' - -# Powerline icon config -POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\UE0B8' -POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\UE0BE' - -POWERLEVEL9K_HOME_ICON='\UF7DB' -POWERLEVEL9K_HOME_SUB_ICON='\UF07C' -POWERLEVEL9K_FOLDER_ICON='\UF07B' -POWERLEVEL9K_ETC_ICON='\UE5FC' -POWERLEVEL9K_LOCK_ICON='\UF023' - -POWERLEVEL9K_VCS_UNSTAGED_ICON='\UF421' -POWERLEVEL9K_VCS_STAGED='\UF055' -POWERLEVEL9K_VCS_UNTRACKED_ICON='\UF059' -POWERLEVEL9K_VCS_BRANCH_ICON='\UE725 ' +# Locales +export LC_ALL=en_US.UTF-8 +export LANG=en_US.UTF-8 + +# Path add bin +path+=("$(readlink /Users/$DEFAULT_USER/bin)") +export path + +# Add aliases +alias krak='/Applications/GitKraken.app/Contents/MacOS/GitKraken -p "$(PWD)" &>> /dev/null &' +alias lsp="ps -ax | grep" +alias lsa="ls -la" +alias lsg="ls | grep" +alias lsag="ls -la | grep" +alias ls="tput setaf 3 && echo \"'lsa' for 'ls -la', \n'lsg' for 'ls | grep',\n'lsag' for 'ls -la | grep',\n'lsp' for 'ps -ax |grep'\" && tput sgr0 && ls" + +# man pages in colors +man() { + LESS_TERMCAP_md=$'\e[01;31m' \ + LESS_TERMCAP_me=$'\e[0m' \ + LESS_TERMCAP_se=$'\e[0m' \ + LESS_TERMCAP_so=$'\e[01;44;33m' \ + LESS_TERMCAP_ue=$'\e[0m' \ + LESS_TERMCAP_us=$'\e[01;32m' \ + command man "$@" +} + +# Source powerlevel10k conf +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
\ No newline at end of file |