Skip to content

Automate Windows Terminal settings deployment via chezmoi #114

Description

@aguil

Summary

windows/terminal/settings.json is git-tracked in this repo, but it is not deployed by chezmoi apply today. The entire windows/ tree is listed in .chezmoiignore.tmpl, and the repo path does not map to Windows Terminal's live LocalState location.

Operators (and agents) can easily assume chezmoi apply updates the running terminal. It does not — live WT settings still require a manual merge (or running windows/backup/export.ps1 in the pull direction only).

This became visible during WSL Sixel graphics work (#112): experimental.sixelSupport: true landed in the tracked windows/terminal/settings.json, but the live Windows Terminal install was never updated because chezmoi apply (WSL or Windows) does not touch that file.

Current state

Layer windows/terminal/settings.json
Git Tracked
chezmoi apply Not applied (windows/ in .chezmoiignore.tmpl)
Live WT path %LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
Docs docs/agent-live-systems.md documents manual merge

Related export workflow: windows/backup/export.ps1 copies from live WT to the repo (backup direction).

Problem

  • Two sources of truth: tracked repo file vs live AppData file.
  • No chezmoi apply path on Windows host to push repo → live WT.
  • WSL chezmoi apply correctly targets Linux $HOME only; it cannot update WT.
  • Full WT restart is still required after settings changes (Sixel, fonts, keybindings).

Proposed direction (deferred)

Pick one (or document a hybrid) when implementing:

  1. Chezmoi target path — Add a managed source at the real WT path, e.g. AppData/Local/Packages/Microsoft.WindowsTerminal_8wekyb3d8bbwe/LocalState/settings.json (and preview package if needed), and stop ignoring that path in .chezmoiignore.tmpl.
  2. run_after sync script — On Windows chezmoi apply, copy windows/terminal/settings.json → live LocalState/settings.json (with dry-run / merge strategy documented).
  3. Clarify docs only — If automation is rejected, make the manual step impossible to miss in README and agent docs (explicit: run on Windows host, full WT restart).

Acceptance criteria

  • Operator can deploy tracked WT settings to live Windows Terminal without hand-editing AppData JSON.
  • docs/agent-live-systems.md reflects the chosen workflow (remove or replace "manual merge" if automated).
  • Agents and docs do not imply chezmoi apply from WSL updates WT.
  • Preview vs stable WT package paths documented or handled.
  • Operator reminded that WT requires a full restart after settings apply.

Context

Out of scope (for now)

  • Changing the manual-merge policy in this issue's implementation — tracking only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions