arch.zshrc aktualisiert
This commit is contained in:
+60
-64
@@ -1,89 +1,85 @@
|
|||||||
# --- P10k Instant Prompt ---
|
sleep 0.1 && fastfetch --config ~/.config/fastfetch/fastfetch.jsonc
|
||||||
|
|
||||||
|
# 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
|
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
|
||||||
|
|
||||||
# --- Environment ---
|
#zstyle ':completion:*:*:paru:*' aur-search true
|
||||||
export EDITOR='nvim'
|
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
||||||
export VISUAL='nvim'
|
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
||||||
export TERM='xterm-256color'
|
|
||||||
|
|
||||||
# Entferne das '/' aus der Definition eines Wortes
|
|
||||||
WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
|
|
||||||
|
|
||||||
# --- Zinit Setup ---
|
|
||||||
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
|
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
|
||||||
if [ ! -d "$ZINIT_HOME" ]; then
|
[ ! -d $ZINIT_HOME ] && mkdir -p "$(dirname $ZINIT_HOME)"
|
||||||
mkdir -p "$(dirname $ZINIT_HOME)"
|
[ ! -d $ZINIT_HOME/.git ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
|
||||||
git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
|
|
||||||
fi
|
|
||||||
source "${ZINIT_HOME}/zinit.zsh"
|
source "${ZINIT_HOME}/zinit.zsh"
|
||||||
|
|
||||||
# --- Plugins ---
|
source ~/.zsh/catppuccin_mocha-zsh-syntax-highlighting.zsh
|
||||||
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-syntax-highlighting
|
||||||
zinit light zsh-users/zsh-completions
|
zinit light zsh-users/zsh-completions
|
||||||
zinit light zsh-users/zsh-autosuggestions
|
zinit light zsh-users/zsh-autosuggestions
|
||||||
|
|
||||||
zinit snippet OMZ::plugins/git/git.plugin.zsh
|
zinit snippet OMZ::plugins/git/git.plugin.zsh
|
||||||
zinit load 'zsh-users/zsh-history-substring-search'
|
zinit load 'zsh-users/zsh-history-substring-search'
|
||||||
|
zinit ice wait atload'_history_substring_search_config'
|
||||||
|
|
||||||
autoload -Uz compinit && compinit
|
autoload -Uz compinit && compinit
|
||||||
zinit cdreplay -q
|
zinit cdreplay -q
|
||||||
|
|
||||||
# --- Theme & Fastfetch ---
|
|
||||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||||
# Fastfetch erst nach dem Prompt-Setup aufrufen
|
|
||||||
(( $+commands[fastfetch] )) && fastfetch --config ~/.config/fastfetch/fastfetch.jsonc
|
|
||||||
|
|
||||||
# --- History & Options ---
|
|
||||||
HISTSIZE=5000
|
|
||||||
HISTFILE=~/.zsh_history
|
|
||||||
SAVEHIST=$HISTSIZE
|
|
||||||
setopt appendhistory sharehistory hist_ignore_space hist_ignore_all_dups
|
|
||||||
setopt hist_save_no_dups hist_ignore_dups hist_find_no_dups
|
|
||||||
setopt autocd auto_param_slash globdots
|
|
||||||
|
|
||||||
# --- Aliases ---
|
|
||||||
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
|
|
||||||
alias l='ls -lah --color=always --group-directories-first'
|
|
||||||
fi
|
|
||||||
|
|
||||||
# --- Update Script ---
|
|
||||||
|
|
||||||
update_system() {
|
|
||||||
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
|
|
||||||
|
|
||||||
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'
|
|
||||||
|
|
||||||
# Keybindings
|
|
||||||
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 '^[[A' history-substring-search-up
|
||||||
bindkey '^[[B' history-substring-search-down
|
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)
|
||||||
|
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
|
||||||
|
|
||||||
|
HISTSIZE=5000
|
||||||
|
HISTFILE=~/.zsh_history
|
||||||
|
SAVEHIST=$HISTSIZE
|
||||||
|
HISTDUP=erase
|
||||||
|
setopt appendhistory
|
||||||
|
setopt sharehistory
|
||||||
|
setopt hist_ignore_space
|
||||||
|
setopt hist_ignore_all_dups
|
||||||
|
setopt hist_save_no_dups
|
||||||
|
setopt hist_ignore_dups
|
||||||
|
setopt hist_find_no_dups
|
||||||
|
|
||||||
|
setopt autocd
|
||||||
|
setopt auto_param_slash
|
||||||
|
setopt globdots
|
||||||
|
|
||||||
|
# Aliases
|
||||||
|
alias clean-cache='yay -Sc && yay -Yc'
|
||||||
|
alias u='yay -Syu --needed --noconfirm && flatpak update -y && flatpak uninstall --unused'
|
||||||
|
alias q='pacman -Qu && yay -Qa && flatpak update --dry-run'
|
||||||
|
alias yay='yay --noconfirm'
|
||||||
|
alias yayold='yay'
|
||||||
|
alias ff='sleep 0.1 && fastfetch --config ~/.config/fastfetch/fastfetch.jsonc'
|
||||||
|
alias l='ls -lah --color=always --group-directories-first'
|
||||||
|
alias c='clear'
|
||||||
|
alias x='exit'
|
||||||
|
# copy dotfiles to git folder
|
||||||
|
alias cp-dotfiles='cp -r ~/.config/alacritty ~/projects/dotfiles/.config/ && cp -r ~/.config/gtk-3.0 ~/projects/dotfiles/.config/ && cp -r ~/.config/gtk-4.0 ~/projects/dotfiles/.config/ && cp -r ~/.config/hypr ~/projects/dotfiles/.config/ && cp -r ~/.config/fastfetch ~/projects/dotfiles/.config/ && cp -r ~/.config/gedit ~/projects/dotfiles/.config/ && cp -r ~/.config/niri ~/projects/dotfiles/.config/ && cp -r ~/.config/noctalia ~/projects/dotfiles/.config/ && cp -r ~/.config/nvim ~/projects/dotfiles/.config/ && cp -r ~/.config/qt5ct ~/projects/dotfiles/.config/ && cp -r ~/.config/qt6ct ~/projects/dotfiles/.config/ && cp -r ~/.zshrc ~/projects/dotfiles/ && cp -r ~/.p10k.zsh ~/projects/dotfiles/ && cp -r ~/.zsh_history ~/projects/dotfiles/'
|
||||||
|
|
||||||
|
|
||||||
|
# Environment
|
||||||
|
export EDITOR='nvim'
|
||||||
|
export VISUAL='nvim'
|
||||||
|
|
||||||
|
# Entferne das '/' aus der Definition eines Wortes
|
||||||
|
WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
|
||||||
Reference in New Issue
Block a user