remove matplotlib and ranger configs

This commit is contained in:
2026-01-27 21:18:46 +01:00
parent 5273628efb
commit 6ffe4b9e55
8 changed files with 72 additions and 3585 deletions

92
.zshrc
View File

@@ -46,26 +46,29 @@ zinit light zsh-users/zsh-completions
autoload -Uz compinit
compinit
# idk?
zstyle ':completion:*' menu select
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
bindkey '^[[Z' reverse-menu-complete # shift-tab
# search from prefix
zinit light zsh-users/zsh-history-substring-search
bindkey "${key[Up]}" history-substring-search-up
bindkey "${key[Down]}" history-substring-search-down
# key definitions (terminfo + common codes)
typeset -gA key
key[Home]="${terminfo[khome]}"
key[End]="${terminfo[kend]}"
key[Delete]="${terminfo[kdch1]}"
key[Up]="${terminfo[kcuu1]}"
key[Down]="${terminfo[kcud1]}"
key[ShiftTab]="${terminfo[kcbt]}"
key[CtrlLeft]="^[[1;5D"
key[CtrlRight]="^[[1;5C"
# keybindings
bindkey -e # emacs mode
bindkey '\e[1~' beginning-of-line
bindkey '\e[4~' end-of-line
bindkey "\eOH" beginning-of-line
bindkey "\eOF" end-of-line
bindkey '^[[3~' delete-char # Delete key
bindkey '^[[1;5C' forward-word # Ctrl+Right
bindkey '^[[1;5D' backward-word # Ctrl+Left
bindkey '^[.' insert-last-word # Alt+. or Esc,. (last arg of prev cmd)
bindkey -e
[[ -n ${key[Home]} ]] && bindkey ${key[Home]} beginning-of-line
[[ -n ${key[End]} ]] && bindkey ${key[End]} end-of-line
[[ -n ${key[Delete]} ]] && bindkey ${key[Delete]} delete-char
[[ -n ${key[ShiftTab]} ]] && bindkey ${key[ShiftTab]} reverse-menu-complete
[[ -n ${key[CtrlLeft]} ]] && bindkey ${key[CtrlLeft]} backward-word
[[ -n ${key[CtrlRight]} ]] && bindkey ${key[CtrlRight]} forward-word
bindkey '^[.' insert-last-word # Esc,. (last arg of prev cmd)
bindkey '^[b' backward-word # Alt+B
bindkey '^[f' forward-word # Alt+F
bindkey '^[^?' backward-kill-word # Alt+Backspace
@@ -73,51 +76,13 @@ bindkey '^Q' push-line # Ctrl+Q (stash line, type another, comes back
autoload -Uz edit-command-line && zle -N edit-command-line
bindkey '^X^E' edit-command-line # Ctrl+X,E → edit in $EDITOR
# starship config (inline)
export STARSHIP_CONFIG=~/.config/starship.toml
mkdir -p ~/.config
cat > $STARSHIP_CONFIG << 'EOF'
add_newline = true
format = """$git_branch$git_status$character"""
right_format = """$username[@](red)$hostname $cmd_duration$time $directory"""
[git_branch]
format = "[$branch]($style) "
[git_status]
format = '[$all_status$ahead_behind]($style)'
[username]
show_always = true
format = "[$user]($style)"
style_user = "blue bold"
[hostname]
ssh_only = false
format = "[$hostname]($style)"
style = "blue bold"
[directory]
truncation_length = 5
truncate_to_repo = false
style = "cyan bold"
[cmd_duration]
min_time = 5_000
show_milliseconds = true
format = '[$duration]($style) '
[time]
disabled = false
format = "[$time]($style)"
style = "green"
[character]
success_symbol = "[➤](green)"
error_symbol = "[➤](red)"
EOF
# search from prefix
zinit light zsh-users/zsh-history-substring-search
[[ -n ${key[Up]} ]] && bindkey ${key[Up]} history-substring-search-up
[[ -n ${key[Down]} ]] && bindkey ${key[Down]} history-substring-search-down
# starship prompt
export STARSHIP_CONFIG=~/.starship.toml
zinit ice as"command" from"gh-r" \
atclone"./starship init zsh > init.zsh; ./starship completions zsh > _starship" \
atpull"%atclone" src"init.zsh"
@@ -131,6 +96,17 @@ path=(
$path
)
# fzf (if available)
if (( $+commands[fzf] )); then
source <(fzf --zsh 2>/dev/null) || {
# fallback for older fzf versions
[[ -f ~/.fzf.zsh ]] && source ~/.fzf.zsh
[[ -f /usr/share/fzf/key-bindings.zsh ]] && source /usr/share/fzf/key-bindings.zsh
[[ -f /usr/share/fzf/completion.zsh ]] && source /usr/share/fzf/completion.zsh
}
export FZF_DEFAULT_OPTS='--height 40% --reverse'
fi
# aliases: git
alias g="git"
alias a="git add --all :/"