dotfiles/home/.zshrc

54 lines
1.6 KiB
Bash
Raw Normal View History

2021-01-14 12:38:43 +00:00
# ZSH Cache config
2021-01-28 12:55:28 +00:00
export ZSH_CACHE="$HOME/.cache/zsh"
2021-01-14 12:38:43 +00:00
export ZSH_COMPDUMP="$ZSH_CACHE/zcompdump-$ZSH_VERSION"
2021-01-28 12:55:28 +00:00
export HISTFILE=$ZSH_CACHE/history
# Move certain files directly
2021-01-14 12:38:43 +00:00
[ -f ~/.zsh-update ] && mv ~/.zsh-update $ZSH_CACHE/.zsh-update
2021-01-28 12:55:28 +00:00
[ -f ~/.zcompdump ] && mv ~/.zcompdump $ZSH_CACHE/zcompdump-$ZSH_VERSION # Ubuntu refuses to follow env ZSH_COMPDUMP
2020-10-22 16:00:38 +00:00
2021-01-14 12:38:43 +00:00
# ZSH History config
2020-10-22 16:00:38 +00:00
HISTSIZE=10000
SAVEHIST=10000
2021-01-14 12:38:43 +00:00
setopt appendhistory
2020-10-22 16:00:38 +00:00
2021-01-14 12:38:43 +00:00
# oh-my-zsh configuration
2020-10-22 23:15:52 +00:00
export ZSH="/usr/share/oh-my-zsh"
2020-10-22 16:00:38 +00:00
ZSH_THEME="af-magic"
2021-01-14 12:38:43 +00:00
UPDATE_ZSH_DAYS=5
2020-10-22 16:00:38 +00:00
ENABLE_CORRECTION="false"
# Run oh-my-zsh
source $ZSH/oh-my-zsh.sh
# Enable colors
autoload -U colors && colors
# Basic auto/tab complete
autoload -U compinit
zstyle ':completion:*' menu select
zmodload zsh/complist
compinit -d $ZSH_COMPDUMP
comp_options+=(globdots)
2021-01-28 12:55:28 +00:00
# Automatic file removal for cleanup
[ -f ~/.sudo_as_admin_sucessful ] && rm ~/.sudo_as_admin_successful # Ubuntu makes this every with sudo usage
2021-01-14 12:38:43 +00:00
# Environmental variable exports, including XDG standard definitions
[ -f ~/.config/sh/environ ] && source ~/.config/sh/environ
2020-10-22 16:00:38 +00:00
# Setup aliases
[ -f ~/.config/sh/aliases ] && source ~/.config/sh/aliases
2021-01-14 12:38:43 +00:00
# Load handlers
[ -f ~/.config/sh/handlers ] && source ~/.config/sh/handlers
2020-10-22 16:00:38 +00:00
2021-01-14 12:38:43 +00:00
# Custom bindings
bindkey '^ ' autosuggest-accept
2020-10-22 16:00:38 +00:00
2021-01-14 12:38:43 +00:00
# Load extensions (should be last)
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null # Syntax highlighting
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh 2>/dev/null # Auto suggestions
2021-01-28 11:56:31 +00:00
source /usr/share/autojump/autojump.zsh 2>/dev/null # Auto-Jump
2020-10-22 16:00:38 +00:00
#neofetch --cpu_temp C --gtk2 off --gtk3 off --color_blocks on --pixterm