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
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"