diff --git a/.zshrc b/.zshrc index 8306de2..7e2dd82 100755 --- a/.zshrc +++ b/.zshrc @@ -1,37 +1,53 @@ -export ZSH=$HOME/.oh-my-zsh -export ZSH_THEME="darkblood" +# Path to Oh My Zsh installation +export ZSH="$HOME/.oh-my-zsh" -# Meaning of LS_COLORS props -# di Directory -# fi File -# ln Symbolic Link -# pi Fifo file -# so Socket file -# bd Block (buffered) special file -# cd Character (unbuffered) special file -# or Symbolic Link pointing to a non-existent file (orphan) -# mi Non-existent file pointed to by a symbolic link (visible when you type ls -l) -# ex File which is executable (ie. has 'x' set in permissions). -export LS_COLORS="di01:fi=31:ln=31:pi=5:so=5:bd=5:cd=5:or=31" -source $ZSH/oh-my-zsh.sh +# Set theme to powerlevel10k for a modern, customizable UI +ZSH_THEME="powerlevel10k/powerlevel10k" +# Enable plugins for functionality plugins=( git dotenv - aws golang docker npm rust yarn zsh-autosuggestions + zsh-history-substring-search + zsh-syntax-highlighting ) -#export GRPC_GO_LOG_VERBOSITY_LEVEL=99 +# Source Oh My Zsh +source $ZSH/oh-my-zsh.sh + +# Powerlevel10k configuration for dark theme with red accents +# Run `p10k configure` to customize or edit ~/.p10k.zsh +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + +# Customize zsh-autosuggestions highlight style (red font, subtle background) +ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#ff5555,bg=#323232" + +# LS_COLORS for file listings (red-focused for blue light filtering) +export LS_COLORS="di=1;31:fi=0;31:ln=0;31:pi=0;31:so=0;31:bd=0;31:cd=0;31:or=0;31:ex=0;32" + +# History settings for better usability +HISTSIZE=10000 +SAVEHIST=10000 +HISTFILE=~/.zsh_history +setopt HIST_IGNORE_DUPS +setopt HIST_IGNORE_SPACE +setopt HIST_REDUCE_BLANKS +setopt SHARE_HISTORY + +# Key bindings for history substring search +bindkey '^[[A' history-substring-search-up +bindkey '^[[B' history-substring-search-down + +# Environment variables from your original config export PATH=$PATH:/usr/lib/libvirt:/etc/libvirt:/usr/include/libvirt:/usr/share/libvirt export PATH=$PATH:/usr/local/go/bin export PATH=$PATH:$HOME/go/bin -export PATH=$PATH:$HOME/custom_scripts export PATH=$PATH:/usr/bin export PATH=$PATH:/usr/local/sbin export GOPRIVATE=gitea.urkob.com/urko @@ -42,21 +58,55 @@ export PATH=$PATH:$HOME/.pub-cache/bin export PATH=$PATH:$HOME/.dotnet export PATH=$PATH:$HOME/.dotnet/tools export DOTNET_ROOT=$HOME/.dotnet - export JAVA_HOME=/usr/lib/jvm/java-21-openjdk +export PATH="$HOME/.local/share/solana/install/active_release/bin:$PATH" +export HOMEBREW_NO_ANALYTICS=1 +export PATH="/opt/brew/sbin:$PATH" -export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s w"${XDG_CONFIG_HOME}/nvm")" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +# NVM setup +export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" -DOTNET_CLI_TELEMETRY_OPTOUT=1 +# Dotnet telemetry opt-out +export DOTNET_CLI_TELEMETRY_OPTOUT=1 - -# Git Alias +# Git aliases alias git-ci="git checkout" -alias git-remote-prune="git checkout master && git pull origin master && git remote prune origin" - -export PATH="$HOME/.jenv/bin:$PATH" -eval "$(jenv init -)" - +alias git-prune-master="git checkout master && git pull origin master && git remote prune origin && git fetch origin" +alias git-prune-main="git checkout main && git pull origin main && git remote prune origin && git fetch origin" +# Password generator alias alias mypwgen='pwgen -scny -r "\\" -r "\`" -r "\""' + +# Prompt customization for blue light filter compatibility +POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir vcs) +POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs time) +POWERLEVEL9K_PROMPT_ON_NEWLINE=true +POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="" +POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="%F{#ff5555}➜ %f" +POWERLEVEL9K_DIR_FOREGROUND='red' +POWERLEVEL9K_VCS_FOREGROUND='red' +POWERLEVEL9K_STATUS_OK_FOREGROUND='red' +POWERLEVEL9K_STATUS_ERROR_FOREGROUND='red' +POWERLEVEL9K_TIME_FOREGROUND='red' +POWERLEVEL9K_BACKGROUND='black' + +# Syntax highlighting colors (must be after sourcing zsh-syntax-highlighting) +ZSH_HIGHLIGHT_STYLES[default]="fg=#cc0000" +ZSH_HIGHLIGHT_STYLES[command]="fg=#cc0000,bold" +ZSH_HIGHLIGHT_STYLES[alias]="fg=#cc0000" +ZSH_HIGHLIGHT_STYLES[function]="fg=#cc0000" +ZSH_HIGHLIGHT_STYLES[path]="fg=#ff5555,underline" +ZSH_HIGHLIGHT_STYLES[globbing]="fg=#ff5555" + +# Custom highlight rules for specific commands +ZSH_HIGHLIGHT_PATTERNS=('ls' 'fg=#cc0000,bold') +ZSH_HIGHLIGHT_PATTERNS=('exit' 'fg=#cc0000,bold') + +# Auto-completion settings +zstyle ':completion:*' menu select +zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} +zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + +# Enable fzf for fuzzy finding (if installed) +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh