arch.zshrc aktualisiert
This commit is contained in:
+34
-32
@@ -1,11 +1,11 @@
|
||||
# Fastfetch
|
||||
sleep 0.1 && fastfetch --config ~/.config/fastfetch/fastfetch.jsonc
|
||||
|
||||
# --- P10k Instant Prompt ---
|
||||
# --- P10k Instant Prompt (MUSS GANZ OBEN STEHEN!) ---
|
||||
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
|
||||
|
||||
# Fastfetch (Jetzt nach dem Instant Prompt, damit es den Puffer nicht bricht)
|
||||
sleep 0.1 && fastfetch --config ~/.config/fastfetch/fastfetch.jsonc
|
||||
|
||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
||||
|
||||
@@ -17,33 +17,36 @@ source "${ZINIT_HOME}/zinit.zsh"
|
||||
|
||||
# --- Plugins ---
|
||||
zinit ice depth=1; zinit light romkatv/powerlevel10k
|
||||
zinit light zsh-users/zsh-syntax-highlighting
|
||||
zinit light zsh-users/zsh-completions
|
||||
zinit light zsh-users/zsh-autosuggestions
|
||||
zinit snippet OMZ::plugins/git/git.plugin.zsh
|
||||
zinit light zsh-users/zsh-autosuggestions
|
||||
zinit load 'zsh-users/zsh-history-substring-search'
|
||||
# Syntax-Highlighting IMMER als letztes Plugin laden!
|
||||
zinit light zsh-users/zsh-syntax-highlighting
|
||||
|
||||
autoload -Uz compinit && compinit
|
||||
zinit cdreplay -q
|
||||
|
||||
# --- Theme & Fastfetch ---
|
||||
# --- Theme ---
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
# --- Keybinds ---
|
||||
bindkey -e
|
||||
bindkey "^[[1;5C" forward-word
|
||||
bindkey "^[[1;5D" backward-word
|
||||
bindkey "^[[3~" delete-char
|
||||
#bindkey '^[[A' history-substring-search-up
|
||||
#bindkey '^[[B' history-substring-search-down
|
||||
bindkey "$terminfo[kcuu1]" history-substring-search-up
|
||||
bindkey "$terminfo[kcud1]" history-substring-search-down
|
||||
|
||||
# Shift + Pfeiltasten (verhindert A, B, C, D Ausgabe)
|
||||
# History Substring Search Keybinds
|
||||
bindkey '^[[A' history-substring-search-up
|
||||
bindkey '^[[B' history-substring-search-down
|
||||
|
||||
# Shift + Pfeiltasten
|
||||
bindkey '^[[1;2A' up-line-or-history # Hoch
|
||||
bindkey '^[[1;2B' down-line-or-history # Runter
|
||||
bindkey '^[[1;2C' forward-char # Rechts
|
||||
bindkey '^[[1;2D' backward-char # Links
|
||||
|
||||
# --- History Config ---
|
||||
HISTSIZE=5000
|
||||
HISTFILE=~/.zsh_history
|
||||
SAVEHIST=$HISTSIZE
|
||||
@@ -63,7 +66,7 @@ setopt globdots
|
||||
# --- Environment ---
|
||||
export EDITOR='nvim'
|
||||
export VISUAL='nvim'
|
||||
export TERM='xterm-256color'
|
||||
# export TERM='xterm-256color' <-- GELÖSCHT, damit Alacritty sich nicht verschluckt
|
||||
|
||||
# Entferne das '/' aus der Definition eines Wortes
|
||||
WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
|
||||
@@ -73,7 +76,6 @@ alias c='clear'
|
||||
alias x='exit'
|
||||
alias yay='yay --noconfirm'
|
||||
|
||||
# Check ob eza installiert ist, sonst ls fallback
|
||||
if (( $+commands[eza] )); then
|
||||
alias l='eza -lagh --group-directories-first'
|
||||
else
|
||||
@@ -82,24 +84,24 @@ fi
|
||||
|
||||
# --- Update Script ---
|
||||
update_system() {
|
||||
echo "--- System Update ---"
|
||||
if (( $+commands[yay] )); then
|
||||
yay -Syu --needed --noconfirm
|
||||
else
|
||||
sudo pacman -Syu --noconfirm
|
||||
fi
|
||||
echo "--- System Update ---"
|
||||
if (( $+commands[yay] )); then
|
||||
yay -Syu --needed --noconfirm
|
||||
else
|
||||
sudo pacman -Syu --noconfirm
|
||||
fi
|
||||
|
||||
if (( $+commands[flatpak] )); then
|
||||
echo "--- Flatpak Update ---"
|
||||
flatpak update -y && flatpak uninstall --unused -y
|
||||
fi
|
||||
if (( $+commands[flatpak] )); then
|
||||
echo "--- Flatpak Update ---"
|
||||
flatpak update -y && flatpak uninstall --unused -y
|
||||
fi
|
||||
|
||||
orphans=$(pacman -Qdtq)
|
||||
if [[ -n "$orphans" ]]; then
|
||||
echo "--- Entferne verwaiste Pakete ---"
|
||||
sudo pacman -Rns ${=orphans} --noconfirm
|
||||
else
|
||||
echo "--- System ist bereits sauber ---"
|
||||
fi
|
||||
}
|
||||
orphans=$(pacman -Qdtq)
|
||||
if [[ -n "$orphans" ]]; then
|
||||
echo "--- Entferne verwaiste Pakete ---"
|
||||
sudo pacman -Rns ${=orphans} --noconfirm
|
||||
else
|
||||
echo "--- System ist bereits sauber ---"
|
||||
fi
|
||||
}
|
||||
alias u='update_system'
|
||||
Reference in New Issue
Block a user