updated .zshrc

This commit is contained in:
xesc 2023-12-10 14:58:41 +01:00
parent 01327cfb52
commit 91ecddeabb

77
.zshrc
View file

@ -1,20 +1,14 @@
#ZSH-CONFIG # ZSH-CONFIG
#Configuration of ZSH by: pr073c70r #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 '
#Version: 1.3 #PS1='╭ %F{#7daea3}%~%f ${vcs_info_msg_0_}'$'\n''╰%B%F{#a9b665}%f%b '
#Last Update: 03.10.2021 PROMPT='%F{#eeeeee}%~%f${vcs_info_msg_0_}'$'\n''%B%(?.%F{#478061}>.%F{#ea6962}>)%f%b '
#Info: Runs on Openrc
#Dependency: zsh-syntax-highlighting, zsh-autosuggestions
# 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 %F{#7daea3}%~%f ${vcs_info_msg_0_}'$'\n''╰%B%F{#a9b665}%f%b '
zstyle ':completion:*' completer _complete _ignored _approximate zstyle ':completion:*' completer _complete _ignored _approximate
zstyle ':completion:*' list-colors '' zstyle ':completion:*' list-colors
zstyle ':completion:*' menu select=long-list select=0 zstyle ':completion:*' menu select=long-list select=0
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' use-compctl true zstyle ':completion:*' use-compctl true
zstyle :compinstall filename '/home/pr073c70r/.zshrc'
zmodload zsh/complist zmodload zsh/complist
autoload -Uz compinit autoload -Uz compinit
compinit compinit
@ -26,53 +20,38 @@ HISTFILE=$XDG_DATA_HOME/histfile
setopt nomatch notify setopt nomatch notify
unsetopt beep unsetopt beep
setopt autocd setopt autocd
# Disable ctrl-s to freeze terminal
stty stop undef stty stop undef
bindkey -v
[ -f "$XINITRC" ] && alias startx="startx $XINITRC"
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc"
# 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{#fabd2f}%f%%b %F{#fabd2f}%B%b%f%%b%B%F{#ea6962}%u%c%%b%f'
zstyle ':vcs_info:git:*' actionformats '%B%F{#fabd2f}%f%%b %F{#fabd2f}%B%b%f%%b %F{#a9b665}(%a)%f%B%F{#ea6962}%u%c%%b%f'
#TERMINALCLOCK
#Refresh the Terminalprompt to show running clock
#TMOUT=1
#
#TRAPALRM() {
# zle reset-prompt
#}
# use the vi keys to navigate the menu completion # use the vi keys to navigate the menu completion
bindkey -v
bindkey -M menuselect 'h' vi-backward-char bindkey -M menuselect 'h' vi-backward-char
bindkey -M menuselect 'k' vi-up-line-or-history bindkey -M menuselect 'k' vi-up-line-or-history
bindkey -M menuselect 'l' vi-forward-char bindkey -M menuselect 'l' vi-forward-char
bindkey -M menuselect 'j' vi-down-line-or-history 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{#fabd2f}%f%%b %F{#fabd2f}%B%b%f%%b%B%F{#fabd2f}%u%c%%b%f'
zstyle ':vcs_info:git:*' actionformats ' %B%F{#fabd2f}%f%%b %F{#fabd2f}%B%b%f%%b %F{#478061}(%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=//') local OS=$(grep -w "ID=..*" < /etc/os-release | sed 's/ID=//')
if [ $OS = "artix" ] || [ $OS = "arch" ]; then 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-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
else else