all repos — dot @ db0e9cc4660fcd36a0b729cc53931c318ee0369f

Shell, editor and terminal configuration, and the tools that go with them

alacritty-mosh: unique per-launch config paths

The per-target files in /tmp/alacritty were deleted by the session's
cleanup trap, so a second window to the same host (or a relaunch racing
a previous exit) lost its config mid-flight and Alacritty logged
"Unable to load config ... File not found" on live reload. Suffix the
paths with the launcher PID so each instance owns its own files.
Igor Soarez igor@soarez.org
Sun, 18 Oct 2026 10:25:29 +0300
commit

db0e9cc4660fcd36a0b729cc53931c318ee0369f

parent

95056eacdff97a710129bbb29e707ab83f5faa72

1 files changed, 4 insertions(+), 2 deletions(-)

jump to
M bin/alacritty-mosh → bin/alacritty-mosh

@@ -4,8 +4,10 @@ set -euo pipefail

target="$1" dedicated_dir='/tmp/alacritty' -dedicated_cfg="${dedicated_dir}/$target.conf" -dedicated_sh="${dedicated_dir}/${target}.sh" +# Unique per launch: cleanup deletes the files when the session inside ends, +# so a second window (or a relaunch racing a previous exit) must not share them. +dedicated_cfg="${dedicated_dir}/${target}.$$.conf" +dedicated_sh="${dedicated_dir}/${target}.$$.sh" mkdir -p "${dedicated_dir}" main_cfg="${HOME}/.config/alacritty/alacritty.toml"