#!/bin/zsh # Exports export LANG="en_US.UTF-8" export LC_ALL="en_US.UTF-8" export XDG_DOWNLOAD_DIR="${HOME}/downloads" export EDITOR="nvim" export PATH="${PATH}:${HOME}/.local/bin" export PATH="${PATH}:${HOME}/.cargo/bin" export ZDOTDIR="${ZDOTDIR:-$HOME/.config/zsh}" export QT_QPA_PLATFORM="wayland-egl" export QT_QPA_PLATFORMTHEME="qt5ct" export QT_WAYLAND_DISABLE_WINDOWDECORATION="1" # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ # ┃ General ┃ # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ export HISTFILE="${HOME}/.zsh_history" export HISTCONTROL="ignoredups:ignorespace" export HISTSIZE="100000" export HISTFILESIZE="200000" export SAVEHIST="${HISTSIZE}" setopt HIST_IGNORE_ALL_DUPS setopt HIST_IGNORE_SPACE setopt EXTENDED_HISTORY setopt HIST_EXPIRE_DUPS_FIRST setopt HIST_IGNORE_DUPS setopt HIST_VERIFY setopt SHARE_HISTORY export TERM="xterm-256color" export COLUMNS="80" # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ # ┃ ZSH Plugins ┃ # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ZSH_CUSTOM="$ZDOTDIR/plugins" plugins=( zsh-autosuggestions zsh-syntax-highlighting ) for plugin in $plugins; do source "$ZSH_CUSTOM/$plugin/${plugin}.zsh" done ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#999999" # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ # ┃ Completion system (modern menu) ┃ # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ autoload -Uz compinit && compinit zstyle ':completion:*' menu select # arrow-key menu zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' # case insensitive zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" # colored completion zstyle ':completion:*' rehash true # auto-refresh completion if new programs installed # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ # ┃ Keybinds ┃ # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ bindkey '^[[Z' autosuggest-accept # Shift+Tab accepts suggestion bindkey '^ ' autosuggest-accept # Ctrl+Space also accepts bindkey '^[[A' history-beginning-search-backward # Up arrow: search history bindkey '^[[B' history-beginning-search-forward # Down arrow: search history # Common bindings for Alt + Arrow (Meta + Arrow) bindkey '^[[1;3C' forward-word # Alt + Right bindkey '^[[1;3D' backward-word # Alt + Left # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ # ┃ Alias ┃ # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ alias ls='ls --color=auto --group-directories-first' alias ll='ls -lh --color=auto --group-directories-first' alias la='ls -lah --color=auto --group-directories-first' alias grep='grep --color=auto' alias ..='cd ..' alias ...='cd ../..' alias ....='cd ../../..' # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ # ┃ Prompt with git status ┃ # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ # Load version control info autoload -Uz vcs_info # Load colors autoload -Uz colors && colors # Run vcs_info before each prompt precmd_functions+=(vcs_info) # Enable prompt substitution setopt prompt_subst # Configure the format for git zstyle ':vcs_info:git:*' formats ' (%b)' zstyle ':vcs_info:git:*' enable git # Set the PROMPT variable to include the vcs_info_msg_0_ variable PROMPT='%F{#bb9af7}%~%f%F{#7dcfff}${vcs_info_msg_0_}%f %# '