From cbae203ac5de0fb6424b96b1b49dca4338f5bd19 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Sun, 31 May 2026 19:07:13 +0300 Subject: [PATCH] update to a working .zshrc --- .zshrc | 64 ++++++++++++++++++++++++---------------------- .zshrc-other | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+), 31 deletions(-) create mode 100644 .zshrc-other diff --git a/.zshrc b/.zshrc index c6e4ea8..2386e96 100644 --- a/.zshrc +++ b/.zshrc @@ -7,6 +7,14 @@ if [[ ! -d "$HOME/.config/tmux/plugins/catppuccin" ]]; then git clone -b v2.1.2 https://github.com/catppuccin/tmux.git ~/.config/tmux/plugins/catppuccin/tmux fi +# pnpm +export PNPM_HOME="/home/kyren/.local/share/pnpm" +case ":$PATH:" in + *":$PNPM_HOME:"*) ;; + *) export PATH="$PNPM_HOME:$PATH" ;; +esac +# pnpm end + # Install zinit if missing if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f" @@ -24,23 +32,26 @@ autoload -Uz _zinit autoload -Uz compinit compinit -# Fzf Completions -zinit light Aloxaf/fzf-tab # Needs to be loaded before other plugins +# Zsh plugins +zinit ice wait lucid && zinit light zsh-users/zsh-syntax-highlighting +zinit ice wait lucid && zinit light zsh-users/zsh-completions +zinit ice wait lucid && zinit light Aloxaf/fzf-tab +zinit light zsh-users/zsh-autosuggestions + +# Styling for fzf-tab completion zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" zstyle ':completion:*' menu no zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls $realpath' zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls $realpath' -# Zsh plugins -zinit ice wait lucid && zinit light zsh-users/zsh-syntax-highlighting -zinit ice wait lucid && zinit light zsh-users/zsh-completions -zinit light zsh-users/zsh-autosuggestions +# Load oh my posh +eval "$(oh-my-posh init zsh --config $HOME/.config/ohmyposh/tokyocat.omp.yml)" # Shell integrations -zinit ice wait lucid atload'eval "$(zoxide init --cmd cd zsh)"' -zinit ice wait lucid atload'source <(k completion zsh)' -eval "$(oh-my-posh init zsh --config $HOME/.config/ohmyposh/tokyocat.omp.yml)" +zinit ice wait lucid atload'source <(fzf --zsh)' && zinit load zdharma-continuum/null +zinit ice wait lucid atload'eval "$(zoxide init --cmd cd zsh)"' && zinit load zdharma-continuum/null +zinit ice wait lucid atload'source <(k completion zsh)' && zinit load zdharma-continuum/null # Fzf export FZF_DEFAULT_COMMAND="fd --hidden --strip-cwd-prefix --exclude .git" @@ -50,16 +61,13 @@ export FZF_DEFAULT_OPTS=" \ --color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \ --color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \ --color=marker:#f5e0dc,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8" -source fzf-git.sh -source <(fzf --zsh) +source $HOME/scripts/fzf-git.sh -# pnpm -export PNPM_HOME="/home/kyren/.local/share/pnpm" -case ":$PATH:" in - *":$PNPM_HOME:"*) ;; - *) export PATH="$PNPM_HOME:$PATH" ;; -esac -# pnpm end +# # Keybindings +bindkey -v # Vim Mode +bindkey '^p' history-search-backward +bindkey '^n' history-search-forward +bindkey "^y" autosuggest-accept # History HISTSIZE=100000 @@ -74,12 +82,6 @@ setopt hist_save_no_dups setopt hist_ignore_dups setopt hist_find_no_dups -# # Keybindings -bindkey -v # Vim Mode -bindkey '^p' history-search-backward -bindkey '^n' history-search-forward -bindkey "^y" autosuggest-accept - # Misc Aliases alias ls='eza --group-directories-first --across --icons auto' alias tree='eza --tree --icons' @@ -110,12 +112,12 @@ export WINEDEBUG=-all # Path export GOPATH="$HOME/go" -export PATH="$GOPATH/bin:$PATH" -export PATH="$HOME/scripts:$PATH" -export PATH="$HOME/.zig:$PATH" -export PATH="$HOME/.zls:$PATH" -export PATH="$HOME/projects/k/bin:$PATH" -export PATH="$HOME/bin:$PATH" +export PATH="$PATH:$GOPATH/bin" +export PATH="$PATH:$HOME/scripts" +export PATH="$PATH:$HOME/.zig" +export PATH="$PATH:$HOME/.zls" +export PATH="$PATH:$HOME/projects/k/bin" +export PATH="$PATH:$HOME/bin" export PATH="$PATH:/opt/nvim-linux-x86_64/bin" # Start ssh-agent if not running @@ -132,6 +134,6 @@ if [ -v K_SWITCH_HOME ]; then k switch $HOME fi -if false; then +if true; then printf "\e[38;5;34m⚡ \e[38;5;220m.zshrc parsed in \e[38;5;33m%.0fms\e[0m\n" "$(( SECONDS * 1000 ))" fi diff --git a/.zshrc-other b/.zshrc-other new file mode 100644 index 0000000..ed7e8d2 --- /dev/null +++ b/.zshrc-other @@ -0,0 +1,72 @@ + +# Zsh plugins +zinit ice wait lucid && zinit light zsh-users/zsh-syntax-highlighting +zinit ice wait lucid && zinit light zsh-users/zsh-completions +zinit ice wait lucid && zinit light Aloxaf/fzf-tab +zinit light zsh-users/zsh-autosuggestions + +# Completion styling +zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' +zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" +zstyle ':completion:*' menu no +zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls $realpath' +zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls $realpath' + +# Load oh my posh +eval "$(oh-my-posh init zsh --config $HOME/.config/ohmyposh/tokyocat.omp.yml)" + +# Shell integrations +zinit ice wait lucid atload'source <(fzf --zsh)' && zinit load zdharma-continuum/null +zinit ice wait lucid atload'eval "$(zoxide init --cmd cd zsh)"' && zinit load zdharma-continuum/null +zinit ice wait lucid atload'source <(k completion zsh)' && zinit load zdharma-continuum/null + +# Fzf +export FZF_DEFAULT_COMMAND="fd --hidden --strip-cwd-prefix --exclude .git" +export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" +export FZF_ALT_C_COMMAND="fd --type=d --hidden --strip-cwd-prefix --exclude .git" +export FZF_DEFAULT_OPTS=" \ + --color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \ + --color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \ + --color=marker:#f5e0dc,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8" +source fzf-git.sh + +##############################33 +##############################33 +##############################33 +##############################33 +##############################33 +##############################33 +##############################33 +##############################33 +##############################33 +##############################33 +##############################33 + +# Fzf Completions +zinit light Aloxaf/fzf-tab # Needs to be loaded before other plugins +zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' +zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" +zstyle ':completion:*' menu no +zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls $realpath' +zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls $realpath' + +# Zsh plugins +zinit ice wait lucid && zinit light zsh-users/zsh-syntax-highlighting +zinit ice wait lucid && zinit light zsh-users/zsh-completions +zinit light zsh-users/zsh-autosuggestions + +# Shell integrations +zinit ice wait lucid atload'eval "$(zoxide init --cmd cd zsh)"' +zinit ice wait lucid atload'source <(k completion zsh)' +eval "$(oh-my-posh init zsh --config $HOME/.config/ohmyposh/tokyocat.omp.yml)" + +# Fzf +export FZF_DEFAULT_COMMAND="fd --hidden --strip-cwd-prefix --exclude .git" +export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" +export FZF_ALT_C_COMMAND="fd --type=d --hidden --strip-cwd-prefix --exclude .git" +export FZF_DEFAULT_OPTS=" \ + --color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \ + --color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \ + --color=marker:#f5e0dc,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8" +source fzf-git.sh +source <(fzf --zsh)