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