Files
arch-dotfiles/.zshrc

63 lines
2.4 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[[ -f ~/.cache/updates-count ]] && \
count=$(wc -l < ~/.cache/updates-count) && \
(( count > 0 )) && echo "$count paquets en attente"
# 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
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# ~/.zshrc
# Si le shell n'est pas interactif, ne rien faire
[[ $- != *i* ]] && return
# History
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt inc_append_history # Sauvegarde immédiate
setopt hist_ignore_all_dups # Ignorer les doublons
# Alias (identiques à ceux du bashrc)
alias ls='eza --icons --group-directories-first'
alias ll='eza -lh --icons --grid --group-directories-first'
# Variables denvironnement
export EDITOR=nano
export VISUAL=nano
# Shortcuts
bindkey "^[[H" beginning-of-line # Begin
bindkey "^[[F" end-of-line # End
bindkey "^[[5~" history-beginning-search-backward # PageUp
bindkey "^[[6~" history-beginning-search-forward # PageDown
bindkey "^[[Z" reverse-menu-complete # Reverse completion
bindkey "^[[1;5D" backward-word # Previous word
bindkey "^[[1;5C" forward-word # Next word
bindkey "^[[3;5~" delete-word # Ctrl+Suppr
bindkey "^H" backward-delete-word # Ctrl+Backspace (parfois ^?)
# powerlevel10k
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
export TERMINAL=alacritty
# Bind SUPPR
bindkey '^[[3~' delete-char
# Update and clean
alias update='yay -Syu --noconfirm && yay -Yc --noconfirm && sudo mkinitcpio -P && sudo /home/lucas/scripts/mkinitcpio-eco && clean'
alias clean='sudo rm -f /var/cache/pacman/pkg/download-* 2>/dev/null; yay -Sc --noconfirm 2>/dev/null; sudo journalctl --vacuum-time=2weeks; sudo pacman -Rns $(pacman -Qdtq) 2>/dev/null'
alias clr='clear'
alias rembg='~/.venv/rembg/bin/rembg'
alias pio="$HOME/.platformio/penv/bin/pio"
# Created by `pipx` on 2026-06-16 16:04:30
export PATH="$PATH:/home/lucas/.local/bin"
alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'