diff --git a/scripts/setup/machine-setup/machine-setup.sh b/scripts/setup/machine-setup/machine-setup.sh index 7b76a3ba..b8a997d7 100755 --- a/scripts/setup/machine-setup/machine-setup.sh +++ b/scripts/setup/machine-setup/machine-setup.sh @@ -2225,7 +2225,11 @@ if ! skip; then esac fi - if [[ -r "$SCRIPT_DIR/.tmux.conf" ]]; then + # `tmux.conf`, no leading dot. It is a TEMPLATE in the repository, not a + # dotfile in a home directory, and the destination is increasingly + # ~/.config/tmux/tmux.conf — which has no dot either. Naming the source after + # a path it may not be installed to is how you end up reading the wrong file. + if [[ -r "$SCRIPT_DIR/tmux.conf" ]]; then # Not always ~/.tmux.conf — see tmux_config_target. tmux 3.1+ prefers # ~/.config/tmux/tmux.conf, so writing the old path on a machine that has # the new one produces a file tmux never reads and a success message that @@ -2236,7 +2240,7 @@ if ! skip; then echo " Targeting the one it actually reads: ${TMUX_TARGET}" fi install -d -m 0755 -o "$USERNAME" -g "$(user_group)" "$(dirname "$TMUX_TARGET")" - install_config "$SCRIPT_DIR/.tmux.conf" "$TMUX_TARGET" "$USERNAME" && RC=0 || RC=$? + install_config "$SCRIPT_DIR/tmux.conf" "$TMUX_TARGET" "$USERNAME" && RC=0 || RC=$? case $RC in 0) ok "tmux config installed — ${TMUX_TARGET}" ;; 1) echo " tmux config already matches (${TMUX_TARGET})" ;; diff --git a/scripts/setup/machine-setup/.tmux.conf b/scripts/setup/machine-setup/tmux.conf similarity index 100% rename from scripts/setup/machine-setup/.tmux.conf rename to scripts/setup/machine-setup/tmux.conf