diff --git a/zshrc b/zshrc index 81bf51d..2727d43 100644 --- a/zshrc +++ b/zshrc @@ -1,36 +1,17 @@ -# Path settings -export PATH=/usr/local/bin:$PATH +# path +export PATH=/home/aaron/.cargo/bin:$PATH -# Path to oh-my-zsh installation. -export ZSH=/usr/share/oh-my-zsh/ +# Syntax highlighting +source /usr/share/zsh/site-functions/zsh-syntax-highlighting.zsh +source /home/$USER/.oh-my-zsh/oh-my-zsh.sh -# Don't try to display a powerlinefont theme in a tty -if [[ $TERM == "linux" ]] || [[ $TERM == "screen" ]] ; then - ZSH_THEME="gentoo" +# Don't try to display a fancy theme in a tty +if [[ $TERM == "linux" ]] || [[ $TERM == "screen" ]] || [[ $TERM == "xterm" ]] ; then + [[ ! -f ~/.p10k-portable.zsh ]] || source ~/.p10k-portable.zsh else - ZSH_THEME="agnoster" + [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh fi -# Uncomment the following line to disable bi-weekly auto-update checks. -DISABLE_AUTO_UPDATE="false" -# Auto update zsh -UPDATE_ZSH_DAYS=13 -# Disable auto-setting terminal title. -DISABLE_AUTO_TITLE="true" -# Timestamps in zsh history -HIST_STAMPS="mm/dd/yyyy" -# No duplicates in history -HIST_IGNORE_DUPS="true" - -# List of plugins -plugins=( - git - last-working-dir - fbterm - ssh-agent - gpg-agent -) - # Move one word left or right using alt bindkey "[D" backward-word bindkey "^[h" backward-word @@ -38,15 +19,41 @@ bindkey "[C" forward-word bindkey "^[l" forward-word # Aliases +alias ls="ls --color=auto" alias lsblk="lsblk -o +LABEL" alias ip="ip -c" alias showip="ip --brief a" alias ssh='TERM=xterm ssh' +alias ll="ls -l" -# ZSH cache dir config -ZSH_CACHE_DIR=$HOME/.cache/oh-my-zsh -if [[ ! -d $ZSH_CACHE_DIR ]]; then - mkdir $ZSH_CACHE_DIR +# History config +HIST_IGNORE_DUPS="true" +HIST_STAMPS="mm/dd/yyyy" +HISTFILE=~/.zsh_history +HISTSIZE=999999999 +SAVEHIST=$HISTSIZE +setopt SHARE_HISTORY + +# Autocompletion behaviour +autoload -Uz compinit; compinit +zstyle ':completion:*' menu select + +# oh-my-zsh configs +DIASBLE_AUTO_TITLE="true" +DISABLE_AUTO_UPDATE="false" +UPDATE_ZSH_DAYS=5 + +# oh-my-zsh plugins +#plugins=( +# ssh-agent +# gpg-agent +#) + +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block; everything else may go below. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi -source $ZSH/oh-my-zsh.sh +source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme