chezmoi v2: omz + p10k + fzf + vi-mode zsh, tmux, per-account gitconfig (#612)

Rewrote the Aug-1 sandbox-era source into a full workstation setup for
both ultix-streaming accounts: oh-my-zsh with autosuggestions/
syntax-highlighting/completions + powerlevel10k (pinned externals),
fzf wiring, vi mode, tmux conf, aliases under ~/.config/zsh, gitconfig
template that keeps hooksPath/tea for reachableceo only.

Detail + verification: https://projects.knownelement.com/issues/612#note-3335
This commit is contained in:
2026-09-01 11:40:44 -05:00
parent 4d6b2262c9
commit b28f38d4c0
10 changed files with 260 additions and 165 deletions
+83 -100
View File
@@ -1,132 +1,115 @@
#CNW Customized zshrc
# Last updated 2025-01-14
# This is running on ultix-sandbox. That is my peramment home/base of operations.
# I try to minimize interactive shell use on other systems and do everything via gitops or termix
# This files merges :
# - my own creature comforts/wants
# along with stuff from
# - oh-my-zsh installer
# - powerline
# - powerlevl10k
# Oh-my-zsh
# CNW zshrc — chezmoi-managed (dotfiles repo, Redmine #612)
# Home base: ultix-streaming (VM 5111). Minimal interactive footprint
# anywhere else; heavy lifting happens in containers.
#
# Layers: oh-my-zsh + powerlevel10k, fzf, vi mode, ~/.config/zsh/* snippets.
#####################################################################
# oh-my-zsh
#####################################################################
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="robbyrussell"
ZSH_THEME="powerlevel10k/powerlevel10k"
# externals in .chezmoiexternal.toml own updates
zstyle ':omz:update' mode disabled
ENABLE_CORRECTION="true"
DISABLE_UNTRACKED_FILES_DIRTY="true"
HIST_STAMPS="yyyy-mm-dd"
plugins=(git)
plugins=(
git
sudo
z
extract
copypath
colored-man-pages
command-not-found
zsh-completions
zsh-autosuggestions
zsh-syntax-highlighting
)
source $ZSH/oh-my-zsh.sh
# powerlevel10k (run `p10k configure` any time for the fancy wizard)
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
#####################################################################
# Creature comforts
#####################################################################
###################################################################################################################################
# CNW configuration from here
###################################################################################################################################
#############################
#############################
# Creature comforts
#############################
#############################
#########
#VIM MODE
#########
#vi 24x7 yo, this isn't a holiday inn (ti was last night, it isn't now)
bindkey -v # vi key bindings
# vi mode, 24x7 — this isn't a holiday inn
bindkey -v
export KEYTIMEOUT=1
set -o vi
export EDITOR='vim'
export VISUAL='vim'
export PAGER='less'
export LESS='-R'
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='vim'
fi
# Debian's fd-find ships fdfind; make it fd
command -v fdfind >/dev/null 2>&1 && alias fd='fdfind'
# Debian's bat ships batcat
command -v batcat >/dev/null 2>&1 && alias bat='batcat'
###################################
###################################
# History configurations
###################################
###################################
#####################################################################
# History
#####################################################################
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=50000000 #Number of history entries to save to disk
HIST_STAMPS="mm/dd/yyyy"
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
setopt hist_ignore_dups # ignore duplicated commands history list
HISTDUP=erase #Erase duplicates in the history file
setopt hist_verify # show command with history expansion to user before running it
setopt appendhistory #Append history to the history file (no overwriting)
setopt incappendhistory #Immediately append to the history file, not just when a term is killed
SAVEHIST=50000
setopt hist_expire_dups_first
setopt hist_ignore_dups
setopt hist_verify
setopt appendhistory
setopt incappendhistory
HISTDUP=erase
alias history="history 0"
alias history="history 0" # force zsh to show the complete history
#DO NOT Share history across terminals
# DO NOT share history across terminals
setopt no_share_history
unsetopt sharehistory
unsetopt sharehistory
TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P' # configure `time` format
TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P'
#####################################################################
# fzf (Debian package paths)
#####################################################################
###################################
###################################
# SSH related things
###################################
###################################
if [[ -r /usr/share/doc/fzf/examples/key-bindings.zsh ]]; then
source /usr/share/doc/fzf/examples/key-bindings.zsh
fi
if [[ -r /usr/share/doc/fzf/examples/completion.zsh ]]; then
source /usr/share/doc/fzf/examples/completion.zsh
fi
export FZF_DEFAULT_COMMAND='fdfind --type f --hidden --follow --exclude .git 2>/dev/null || rg --files --hidden --glob "!.git" 2>/dev/null'
command -v fdfind >/dev/null 2>&1 && _fzf_compgen_path() { fdfind --hidden --follow --exclude .git . "$1" 2>/dev/null; }
######################
# Bitwarden SSH Agent
######################
#####################################################################
# SSH agent — bitwarden agent socket if present (path per-host)
#####################################################################
export SSH_AUTH_SOCK=/home/charles/.bitwarden-ssh-agent.sock
if [[ -S "$HOME/.bitwarden-ssh-agent.sock" ]]; then
export SSH_AUTH_SOCK="$HOME/.bitwarden-ssh-agent.sock"
fi
#####################################################################
# Paths and loaders (conditional — hosts without these skip)
#####################################################################
###################################
###################################
# Paths and loaders
###################################
###################################
#######
# Rust
#######
. "$HOME/.cargo/env"
#######
# MISE
#######
[[ -r "$HOME/.cargo/env" ]] && . "$HOME/.cargo/env"
if command -v mise &> /dev/null; then
eval "$(mise activate zsh)"
fi
#####################################################################
# Personal snippets (also chezmoi-managed)
#####################################################################
###################################
###################################
#Aliases...
###################################
###################################
source ~/Projects/ReachableCEO/dotfiles/zsh-configs/reachableceo-zshrc-aliases.sh
[[ -r "$HOME/.config/zsh/variables.sh" ]] && source "$HOME/.config/zsh/variables.sh"
[[ -r "$HOME/.config/zsh/aliases.sh" ]] && source "$HOME/.config/zsh/aliases.sh"