102 lines
2.9 KiB
Bash
102 lines
2.9 KiB
Bash
# 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 config files
|
|
#------------------------------
|
|
if [ -r $HOME/.zaliases ] ; then
|
|
source $HOME/.zaliases
|
|
fi
|
|
|
|
ZSH_THEME="powerlevel10k/powerlevel10k"
|
|
#ZSH_THEME="bubblified"
|
|
|
|
# Auto completion
|
|
autoload -Uz compinit
|
|
typeset -i updated_at=$(date +'%j' -r ~/.zcompdump 2>/dev/null || stat -f '%Sm' -t '%j' ~/.zcompdump 2>/dev/null)
|
|
if [ $(date +'%j') != $updated_at ]; then
|
|
compinit -i
|
|
else
|
|
compinit -C -i
|
|
fi
|
|
|
|
# Load complist module
|
|
zmodload -i zsh/complist
|
|
|
|
# Save history
|
|
HISTFILE=$HOME/.zsh_history
|
|
HISTSIZE=100000
|
|
SAVEHIST=$HISTSIZE
|
|
|
|
# No duplicates in history
|
|
setopt hist_ignore_all_dups # remove older duplicate entries from history
|
|
setopt hist_reduce_blanks # remove superfluous blanks from history items
|
|
setopt inc_append_history # save history entries as soon as they are entered
|
|
setopt share_history # share history between different instances of the shell
|
|
|
|
# Auto correction
|
|
setopt correct_all # autocorrect commands
|
|
setopt auto_list # automatically list choices on ambiguous completion
|
|
setopt auto_menu # automatically use menu completion
|
|
setopt always_to_end # move cursor to end if word had one match
|
|
|
|
#oh-my-zsh plugins
|
|
plugins=(
|
|
zsh-autosuggestions
|
|
zsh-syntax-highlighting
|
|
tmux
|
|
yadm
|
|
archlinux
|
|
fzf-tab
|
|
git-auto-fetch
|
|
sudo
|
|
)
|
|
|
|
source $ZSH/oh-my-zsh.sh
|
|
|
|
# My scripts
|
|
PATH=/usr/local/bin:/home/hate/.local/bin:/home/hate/.config/Scripts:$PATH
|
|
|
|
# Wpg restore on terminals
|
|
(cat ~/.config/wpg/sequences &)
|
|
|
|
# Import colorscheme from 'wal' asynchronously
|
|
# & # Run the process in the background.
|
|
# ( ) # Hide shell job control messages.
|
|
#(cat ~/.cache/wal/sequences &)
|
|
|
|
# Alternative (blocks terminal for 0-3ms)
|
|
#cat ~/.cache/wal/sequences
|
|
|
|
# To add support for TTYs this line can be optionally added.
|
|
#source ~/.cache/wal/colors-tty.sh
|
|
|
|
#FASD
|
|
eval "$(fasd --init auto)"
|
|
|
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
|
|
|
#LF
|
|
LFCD="/home/hate/.config/lf/lfcd.sh"
|
|
if [ -f "$LFCD" ]; then
|
|
source "$LFCD"
|
|
fi
|
|
|
|
bindkey -s '^o' 'lfcd\n'
|
|
|
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|