#!/bin/bash set -euo pipefail target="$1" dedicated_dir='/tmp/alacritty' # 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" # Alacritty loads config files in a way that doesn't allow terminal.shell to be # overriden, so this doesn't work. # cat > "${dedicated_cfg}" < "${dedicated_cfg}" cat >> "${dedicated_cfg}" < "$dedicated_sh" <