From db0e9cc4660fcd36a0b729cc53931c318ee0369f Mon Sep 17 00:00:00 2001 From: Igor Soarez Date: Sun, 18 Oct 2026 10:25:29 +0300 Subject: 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. --- bin/alacritty-mosh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/alacritty-mosh b/bin/alacritty-mosh index 6032828..e6941ae 100755 --- a/bin/alacritty-mosh +++ b/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" -- cgit v1.2.3