65 lines
2.6 KiB
Bash
Executable file
65 lines
2.6 KiB
Bash
Executable file
# ZSH-CONFIG
|
|
|
|
#PS1='%B%F{ebdbb2}[%f%F{#cc241d}%n%f%F{ebdbb2}@%f%F{#689d6a}%m%f%F{ebdbb2}]%f%b %B%F{ebdbb2}[%F{#fabd2f}%~%f%b%B%F{ebdbb2}]%b %B%F{#fabd2f}${vcs_info_msg_0_}%f%b'$'\n''%B%F{#8ec07c}>%f%b '
|
|
#PS1='╭ %F{#7daea3}%~%f ${vcs_info_msg_0_}'$'\n''╰%B%F{#a9b665}%f%b '
|
|
PROMPT='%F{#fffbef}%~%f${vcs_info_msg_0_}'$'\n''%B%(?.%F{#a7c080}>.%F{#e67e80}>)%f%b '
|
|
|
|
zstyle ':completion:*' completer _complete _ignored _approximate
|
|
zstyle ':completion:*' list-colors ''
|
|
zstyle ':completion:*' menu select=long-list select=0
|
|
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
|
|
zstyle ':completion:*' use-compctl true
|
|
zmodload zsh/complist
|
|
autoload -Uz compinit
|
|
compinit
|
|
_comp_options+=(globdots)
|
|
|
|
HISTSIZE=10000000
|
|
SAVEHIST=10000000
|
|
HISTFILE=$XDG_DATA_HOME/histfile
|
|
setopt nomatch notify
|
|
unsetopt beep
|
|
setopt autocd
|
|
|
|
# Disable ctrl-s to freeze terminal
|
|
stty stop undef
|
|
|
|
# use the vi keys to navigate the menu completion
|
|
bindkey -v
|
|
bindkey -M menuselect 'h' vi-backward-char
|
|
bindkey -M menuselect 'k' vi-up-line-or-history
|
|
bindkey -M menuselect 'l' vi-forward-char
|
|
bindkey -M menuselect 'j' vi-down-line-or-history
|
|
|
|
# Configs for Git in Prompt
|
|
# autoload zsh add-zsh-hook and vcs_info functions (-U autoload w/o substition, -z use zsh style)
|
|
autoload -Uz add-zsh-hook vcs_info
|
|
# # Enable substitution in the prompt.
|
|
setopt prompt_subst
|
|
# Run vcs_info just before a prompt is displayed (precmd)
|
|
add-zsh-hook precmd vcs_info
|
|
# Enable checking for (un)staged changes, enabling use of %u and %c
|
|
zstyle ':vcs_info:*' check-for-changes true
|
|
# Set custom strings for an unstaged vcs repo changes (*) and staged changes (+)
|
|
zstyle ':vcs_info:*' unstagedstr ' +'
|
|
zstyle ':vcs_info:*' stagedstr ' *'
|
|
# Set the format of the Git information for vcs_info
|
|
zstyle ':vcs_info:git:*' formats ' %B%F{#dbbc7f}%f%%b %F{#dbbc7f}%B%b%f%%b%B%F{#dbbc7f}%u%c%%b%f'
|
|
zstyle ':vcs_info:git:*' actionformats ' %B%F{#dbbc7f}%f%%b %F{#dbbc7f}%B%b%f%%b %F{#a7c080}(%a)%f%B%F{#fabd2f}%u%c%%b%f'
|
|
|
|
[ -f "$XINITRC" ] && alias startx="startx $XINITRC"
|
|
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc"
|
|
|
|
local OS=$(grep -w "ID=..*" < /etc/os-release | sed 's/ID=//')
|
|
if [ $OS = "artix" ] || [ $OS = "arch" ] || [ $OS = "\"void\"" ]; then
|
|
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
|
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
|
else
|
|
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
|
source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
|
fi
|
|
|
|
if $(which zoxide > /dev/null); then
|
|
eval "$(zoxide init zsh --cmd c)"
|
|
fi
|
|
|