From: Gabriel Dunne Date: Sat, 19 Sep 2026 23:32:21 +0000 (-0700) Subject: Moving common X-Git-Url: https://git.quilime.com/?a=commitdiff_plain;h=0ddc6fecc3c1fffc30fe0aea48ffe8dd196dc619;p=cfg.git Moving common --- diff --git a/.tmux.conf b/.tmux.conf index 9126e9d..95398b4 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -6,8 +6,9 @@ set -g mouse on # Allows for faster key repetition set -s escape-time 0 -# multi-line shift+enter -bind -n S-Enter send-keys C-j +# extended keys +set -g extended-keys on +set -g extended-keys-format csi-u # bind new keys for splits bind | split-window -hc "#{pane_current_path}" diff --git a/.zsh/common.zsh b/.zsh/common.zsh index 13db3ce..12a1c48 100644 --- a/.zsh/common.zsh +++ b/.zsh/common.zsh @@ -8,13 +8,6 @@ setopt share_history hist_ignore_all_dups hist_ignore_space hist_reduce_blanks e export LS_COLORS='di=34:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43' -# Add Homebrew completion definitions without launching Homebrew at shell startup. -if [[ -d /opt/homebrew/share/zsh/site-functions ]]; then - FPATH="/opt/homebrew/share/zsh/site-functions:${FPATH}" -elif [[ -d /usr/local/share/zsh/site-functions ]]; then - FPATH="/usr/local/share/zsh/site-functions:${FPATH}" -fi - autoload -Uz compinit # Rebuild the completion cache only when it is more than 24 hours old. if [[ -n ~/.zcompdump(#qN.mh+24) ]]; then compinit; else compinit -C; fi diff --git a/.zsh/linux.zsh b/.zsh/linux.zsh index aa2186d..8e822b6 100644 --- a/.zsh/linux.zsh +++ b/.zsh/linux.zsh @@ -4,6 +4,9 @@ if command -v ls >/dev/null 2>&1; then alias ls='ls --color=auto' fi +# Shared settings initialize completion before Linux-specific plugins load. +source "$HOME/.zsh/common.zsh" + if command -v fzf-tab >/dev/null 2>&1; then source "$(dirname "$(command -v fzf-tab)")/../share/fzf-tab/fzf-tab.zsh" 2>/dev/null fi diff --git a/.zsh/macos.zsh b/.zsh/macos.zsh index 06f728e..23f9457 100644 --- a/.zsh/macos.zsh +++ b/.zsh/macos.zsh @@ -13,17 +13,28 @@ elif [[ -x /usr/local/bin/brew ]]; then fi if [[ -n ${HOMEBREW_PREFIX:-} ]]; then - # Add Homebrew's tools to the environment without running `brew shellenv`. + # Add Homebrew's tools and completion definitions without running Homebrew. export PATH="$HOMEBREW_PREFIX/bin:$HOMEBREW_PREFIX/sbin:$PATH" export MANPATH="$HOMEBREW_PREFIX/share/man${MANPATH:+:$MANPATH}" export INFOPATH="$HOMEBREW_PREFIX/share/info${INFOPATH:+:$INFOPATH}" + FPATH="$HOMEBREW_PREFIX/share/zsh/site-functions:${FPATH}" +fi + +# fnm is installed through Homebrew on this macOS setup. +if [[ -d "${HOMEBREW_PREFIX:-}/opt/fnm/bin" ]]; then + eval "$(fnm env --shell zsh)" +fi +# Load shared settings after Homebrew has added its completion definitions. +source "$HOME/.zsh/common.zsh" + +# Load plugins after compinit; syntax highlighting must be the final plugin loaded. +if [[ -n ${HOMEBREW_PREFIX:-} ]]; then [[ -r "$HOMEBREW_PREFIX/opt/fzf-tab/share/fzf-tab/fzf-tab.zsh" ]] && \ source "$HOMEBREW_PREFIX/opt/fzf-tab/share/fzf-tab/fzf-tab.zsh" [[ -r "$HOME/.zsh/fzf-tab.zsh" ]] && source "$HOME/.zsh/fzf-tab.zsh" [[ -r "$HOMEBREW_PREFIX/share/zsh-autosuggestions/zsh-autosuggestions.zsh" ]] && \ source "$HOMEBREW_PREFIX/share/zsh-autosuggestions/zsh-autosuggestions.zsh" - # Syntax highlighting must remain the final plugin loaded. [[ -r "$HOMEBREW_PREFIX/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ]] && \ source "$HOMEBREW_PREFIX/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" fi diff --git a/.zshrc b/.zshrc index 63fc81e..d8c807e 100644 --- a/.zshrc +++ b/.zshrc @@ -1,10 +1,11 @@ -# Shared entry point -source "$HOME/.zsh/common.zsh" - +# Each platform configuration loads the shared settings in the required order. if [[ "$OSTYPE" == darwin* ]]; then [[ -r "$HOME/.zsh/macos.zsh" ]] && source "$HOME/.zsh/macos.zsh" elif [[ "$OSTYPE" == linux* ]]; then [[ -r "$HOME/.zsh/linux.zsh" ]] && source "$HOME/.zsh/linux.zsh" +else + # Use the shared configuration on an unrecognized platform. + source "$HOME/.zsh/common.zsh" fi # Optional machine- or work-specific settings. diff --git a/README.md b/README.md index 9330068..e9d1a4c 100644 --- a/README.md +++ b/README.md @@ -60,3 +60,5 @@ the path to the Git directory, $HOME/.cfg/ for bare and $HOME/.cfg/.git/ for no - https://news.ycombinator.com/item?id=11070797 - https://shapeshed.com/vim-netrw/#netrw---the-unloved-directory-browser - https://evanhahn.com/a-decade-of-dotfiles/ +- https://codeberg.org/EvanHahn/dotfiles +