PBKittyConfigStudio 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. pbkittyconfigstudio-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +48 -0
  2. pbkittyconfigstudio-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
  3. pbkittyconfigstudio-0.1.0/.github/workflows/ci.yml +145 -0
  4. pbkittyconfigstudio-0.1.0/.gitignore +56 -0
  5. pbkittyconfigstudio-0.1.0/.markdownlint-cli2.yaml +5 -0
  6. pbkittyconfigstudio-0.1.0/.pre-commit-config.yaml +26 -0
  7. pbkittyconfigstudio-0.1.0/CHANGELOG.md +67 -0
  8. pbkittyconfigstudio-0.1.0/CLAUDE.md +71 -0
  9. pbkittyconfigstudio-0.1.0/CODING.md +342 -0
  10. pbkittyconfigstudio-0.1.0/LICENSE +674 -0
  11. pbkittyconfigstudio-0.1.0/Makefile +258 -0
  12. pbkittyconfigstudio-0.1.0/PBKittyConfigStudio.spec +146 -0
  13. pbkittyconfigstudio-0.1.0/PKG-INFO +161 -0
  14. pbkittyconfigstudio-0.1.0/README.md +133 -0
  15. pbkittyconfigstudio-0.1.0/babel.cfg +13 -0
  16. pbkittyconfigstudio-0.1.0/hatch_build.py +53 -0
  17. pbkittyconfigstudio-0.1.0/pixi.lock +6464 -0
  18. pbkittyconfigstudio-0.1.0/pyproject.toml +105 -0
  19. pbkittyconfigstudio-0.1.0/schema_builder/README.md +76 -0
  20. pbkittyconfigstudio-0.1.0/schema_builder/build_kitty.sh +73 -0
  21. pbkittyconfigstudio-0.1.0/schema_builder/build_schema.py +133 -0
  22. pbkittyconfigstudio-0.1.0/schema_builder/extract_definition.py +94 -0
  23. pbkittyconfigstudio-0.1.0/schema_builder/merge_schema.py +141 -0
  24. pbkittyconfigstudio-0.1.0/schema_builder/pixi.toml +49 -0
  25. pbkittyconfigstudio-0.1.0/schema_builder/rst_clean.py +148 -0
  26. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/__init__.py +3 -0
  27. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/__main__.py +153 -0
  28. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/argparse_qt.py +99 -0
  29. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/config/__init__.py +81 -0
  30. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/config/_babel_extractor.py +35 -0
  31. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/config/schema.json +3654 -0
  32. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/core/__init__.py +0 -0
  33. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/core/kitty_conf.py +316 -0
  34. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/i18n.py +115 -0
  35. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/locale/en/LC_MESSAGES/pb_kitty_config_studio.po +978 -0
  36. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/locale/fr/LC_MESSAGES/pb_kitty_config_studio.po +983 -0
  37. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/platform/__init__.py +1 -0
  38. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/platform/auto_update.py +267 -0
  39. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/platform/desktop.py +174 -0
  40. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/resources/__init__.py +54 -0
  41. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/resources/cancel.svg +1 -0
  42. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/resources/clear-all-data.svg +1 -0
  43. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/resources/help-about.svg +1 -0
  44. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/resources/pbkittyconfigstudio.icns +0 -0
  45. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/resources/pbkittyconfigstudio.ico +0 -0
  46. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/resources/pbkittyconfigstudio.png +0 -0
  47. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/resources/quit.svg +1 -0
  48. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/resources/refresh.svg +1 -0
  49. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/resources/save-as.svg +1 -0
  50. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/resources/save.svg +1 -0
  51. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/ui/__init__.py +0 -0
  52. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/ui/about_dialog.py +160 -0
  53. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/ui/main_window.py +491 -0
  54. pbkittyconfigstudio-0.1.0/src/pb_kitty_config_studio/ui/widgets.py +363 -0
  55. pbkittyconfigstudio-0.1.0/tests/conftest.py +33 -0
  56. pbkittyconfigstudio-0.1.0/tests/test_about_dialog.py +83 -0
  57. pbkittyconfigstudio-0.1.0/tests/test_argparse_qt.py +50 -0
  58. pbkittyconfigstudio-0.1.0/tests/test_auto_update.py +334 -0
  59. pbkittyconfigstudio-0.1.0/tests/test_babel_extractor.py +38 -0
  60. pbkittyconfigstudio-0.1.0/tests/test_desktop.py +127 -0
  61. pbkittyconfigstudio-0.1.0/tests/test_i18n.py +85 -0
  62. pbkittyconfigstudio-0.1.0/tests/test_kitty_conf.py +350 -0
  63. pbkittyconfigstudio-0.1.0/tests/test_main.py +131 -0
  64. pbkittyconfigstudio-0.1.0/tests/test_main_window.py +428 -0
  65. pbkittyconfigstudio-0.1.0/tests/test_resources.py +25 -0
  66. pbkittyconfigstudio-0.1.0/tests/test_schema.py +102 -0
  67. pbkittyconfigstudio-0.1.0/tests/test_schema_builder_extract_definition.py +218 -0
  68. pbkittyconfigstudio-0.1.0/tests/test_schema_builder_merge_schema.py +364 -0
  69. pbkittyconfigstudio-0.1.0/tests/test_schema_builder_rst_clean.py +117 -0
  70. pbkittyconfigstudio-0.1.0/tests/test_widgets.py +323 -0
  71. pbkittyconfigstudio-0.1.0/tools/bump_version.py +92 -0
  72. pbkittyconfigstudio-0.1.0/tools/extract_changelog.py +65 -0
  73. pbkittyconfigstudio-0.1.0/tools/fix_po_files.py +43 -0
  74. pbkittyconfigstudio-0.1.0/tools/git_version.sh +10 -0
  75. pbkittyconfigstudio-0.1.0/tools/po_check.py +181 -0
  76. pbkittyconfigstudio-0.1.0/tools/update_icons.py +241 -0
  77. pbkittyconfigstudio-0.1.0/xx.txt +58 -0
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior:
15
+
16
+ 1. Go to '...'
17
+ 2. Click on '....'
18
+ 3. Scroll down to '....'
19
+ 4. See error
20
+
21
+ **Expected behavior**
22
+ A clear and concise description of what you expected to happen.
23
+
24
+ **Screenshots**
25
+ If applicable, add screenshots to help explain your problem.
26
+
27
+ **Desktop (please complete the following information):**
28
+
29
+ - OS:
30
+ - [ ] Linux
31
+ - [ ] Windows
32
+ - [ ] macOS
33
+ - Version [e.g. 1.0.0]
34
+
35
+ **Environment:**
36
+
37
+ - Installed from:
38
+ - [ ] Asset in release
39
+ - [ ] source
40
+ - [ ] Pypi
41
+ - If installed from source or Pypi
42
+ - [ ] At system level
43
+ - [ ] At user level without environment
44
+ - [ ] from source in python virtualenv
45
+ - [ ] from source in conda/pixi environment
46
+
47
+ **Additional context**
48
+ Add any other context about the problem here.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always
12
+ frustrated when [...]
13
+
14
+ **Describe the solution you'd like**
15
+ A clear and concise description of what you want to happen.
16
+
17
+ **Describe alternatives you've considered**
18
+ A clear and concise description of any alternative solutions or features
19
+ you've considered.
20
+
21
+ **Additional context**
22
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,145 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: ["**"]
6
+ # Semver tags only (glob syntax — + quantifier not supported by GitHub)
7
+ tags: ["v[0-9]*.[0-9]*.[0-9]*"]
8
+ pull_request:
9
+
10
+ # Cancel in-flight runs for the same ref when a newer push arrives.
11
+ concurrency:
12
+ group: ${{ github.workflow }}-${{ github.ref }}
13
+ cancel-in-progress: true
14
+
15
+ jobs:
16
+ # ── Tests ────────────────────────────────────────────────────────────────────
17
+ test:
18
+ name: Tests
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v6
22
+
23
+ - name: Set up pixi environment
24
+ uses: prefix-dev/setup-pixi@v0.10.0
25
+ with:
26
+ pixi-version: latest
27
+ cache: true
28
+
29
+ - name: Compile translation catalogues
30
+ run: pixi run -- pybabel compile -d src/pb_kitty_config_studio/locale -D pb_kitty_config_studio
31
+
32
+ - name: Run test suite
33
+ env:
34
+ QT_QPA_PLATFORM: offscreen
35
+ run: make test
36
+
37
+ - name: Upload coverage to Codecov
38
+ uses: codecov/codecov-action@v7
39
+ with:
40
+ token: ${{ secrets.CODECOV_TOKEN }}
41
+ files: coverage.xml
42
+ fail_ci_if_error: true
43
+
44
+ # ── Pre-commit hooks ─────────────────────────────────────────────────────────
45
+ hooks:
46
+ name: Pre-commit hooks
47
+ runs-on: ubuntu-latest
48
+ steps:
49
+ - uses: actions/checkout@v6
50
+
51
+ - name: Set up pixi environment
52
+ uses: prefix-dev/setup-pixi@v0.10.0
53
+ with:
54
+ pixi-version: latest
55
+ cache: true
56
+
57
+ - name: Cache pre-commit hook environments
58
+ uses: actions/cache@v5
59
+ with:
60
+ path: ~/.cache/pre-commit
61
+ key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
62
+
63
+ - name: Run hooks on all files
64
+ run: pixi run -- pre-commit run --all-files
65
+
66
+ # ── Build executables ────────────────────────────────────────────────────────
67
+ build:
68
+ name: Build / ${{ matrix.os }}
69
+ needs: [test, hooks]
70
+ strategy:
71
+ fail-fast: false
72
+ matrix:
73
+ os: [ubuntu-latest, windows-latest, macos-latest]
74
+ runs-on: ${{ matrix.os }}
75
+
76
+ steps:
77
+ - uses: actions/checkout@v6
78
+
79
+ - name: Set up pixi environment
80
+ uses: prefix-dev/setup-pixi@v0.10.0
81
+ with:
82
+ pixi-version: latest
83
+ cache: true
84
+
85
+ - name: Compile translation catalogues
86
+ # .mo files are gitignored generated artifacts; rebuild from .po sources.
87
+ run: pixi run -- pybabel compile -d src/pb_kitty_config_studio/locale -D pb_kitty_config_studio
88
+
89
+ - name: Build with PyInstaller
90
+ # Call PyInstaller directly to avoid GNU Make portability issues
91
+ # on Windows runners. Single-line command: the `\` line-continuation
92
+ # used by bash is not valid PowerShell, the default shell on
93
+ # windows-latest runners.
94
+ run: pixi run -- pyinstaller --clean --noconfirm --distpath dist --workpath build/pyinstaller PBKittyConfigStudio.spec
95
+
96
+ - name: Zip .app bundle (macOS)
97
+ # A .app bundle is a directory; zip it for upload and release attachment.
98
+ if: runner.os == 'macOS'
99
+ shell: bash
100
+ run: |
101
+ cd dist
102
+ for app in *.app; do
103
+ zip -r "${app%.app}.zip" "$app"
104
+ rm -rf "$app"
105
+ done
106
+
107
+ - name: Upload build artifact
108
+ uses: actions/upload-artifact@v7
109
+ with:
110
+ # One artifact per runner; merged in the release job.
111
+ name: build-${{ runner.os }}
112
+ path: dist/PBKittyConfigStudio-*
113
+ if-no-files-found: error
114
+
115
+ # ── GitHub release ───────────────────────────────────────────────────────────
116
+ release:
117
+ name: Release ${{ github.ref_name }}
118
+ needs: [build]
119
+ # Only create a release on semver tags; the tag filter on push already
120
+ # restricts the trigger, but this guard makes the intent explicit.
121
+ if: github.ref_type == 'tag'
122
+ runs-on: ubuntu-latest
123
+ permissions:
124
+ contents: write # required to create a release and upload assets
125
+
126
+ steps:
127
+ - uses: actions/checkout@v6
128
+
129
+ - name: Download all build artifacts
130
+ uses: actions/download-artifact@v8
131
+ with:
132
+ # Merge all per-OS artifacts into a single flat directory.
133
+ path: dist
134
+ merge-multiple: true
135
+
136
+ - name: Extract changelog entry for ${{ github.ref_name }}
137
+ id: changelog
138
+ run: python3 tools/extract_changelog.py
139
+
140
+ - name: Create GitHub release
141
+ uses: softprops/action-gh-release@v3
142
+ with:
143
+ body: ${{ steps.changelog.outputs.body }}
144
+ files: dist/PBKittyConfigStudio-*
145
+ fail_on_unmatched_files: true
@@ -0,0 +1,56 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ *.egg
6
+ dist/
7
+ build/
8
+ .eggs/
9
+
10
+ # Virtual environments
11
+ .venv/
12
+ venv/
13
+ env/
14
+
15
+ # Testing
16
+ .pytest_cache/
17
+ .coverage
18
+ htmlcov/
19
+ coverage.xml
20
+
21
+ # IDE
22
+ .idea/
23
+ .vscode/
24
+ *.swp
25
+ *~
26
+
27
+ # OS
28
+ .DS_Store
29
+ Thumbs.db
30
+
31
+ # Make stamp files
32
+ .translate.stamp
33
+
34
+ # i18n — generated artifacts, rebuilt on demand by make translate
35
+ *.pot
36
+ *.mo
37
+
38
+ # Claude Code
39
+ .claude/settings.local.json
40
+
41
+ # pixi (defensive: environments should live in ~/PIXI/ via the global
42
+ # `pixi config set --global detached-environments`, but this covers
43
+ # machines/accounts where that global config isn't set, so .pixi/
44
+ # never ends up committed)
45
+ .pixi/
46
+
47
+ # The Node.js prototype this project is inspired by — kept as reference,
48
+ # not part of this repo (it has its own separate git history).
49
+ /original/
50
+
51
+ # schema_builder — kitty's own source tree (cloned/built on demand by
52
+ # schema_builder/build_kitty.sh).
53
+ /schema_builder/kitty_source/
54
+
55
+ # Timestamped backup written before build_schema.py overwrites schema.json.
56
+ /src/pb_kitty_config_studio/config/schema.json.bak_*
@@ -0,0 +1,5 @@
1
+ config:
2
+ MD013:
3
+ # Table rows can't be wrapped without breaking the table syntax; keep
4
+ # the 80-column limit for prose everywhere else.
5
+ tables: false
@@ -0,0 +1,26 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v6.0.0
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ - id: end-of-file-fixer
7
+ - id: mixed-line-ending
8
+ args: [--fix=lf]
9
+ - id: check-merge-conflict
10
+ - id: check-added-large-files
11
+ exclude: ^src/pb_kitty_config_studio/resources/pbkittyconfigstudio\.icns$
12
+ - id: check-yaml
13
+ - id: check-toml
14
+ - id: check-json
15
+
16
+ - repo: https://github.com/astral-sh/ruff-pre-commit
17
+ rev: v0.15.20
18
+ hooks:
19
+ - id: ruff
20
+ args: [--fix]
21
+ - id: ruff-format
22
+
23
+ - repo: https://github.com/DavidAnson/markdownlint-cli2
24
+ rev: v0.22.1
25
+ hooks:
26
+ - id: markdownlint-cli2
@@ -0,0 +1,67 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.1.0] - 2026-08-21
9
+
10
+ ### Added
11
+
12
+ - Initial PySide6 desktop application for configuring kitty's `kitty.conf`.
13
+ - Declarative settings schema (`config/schema.py`) covering ~70 kitty
14
+ settings across 8 categories: fonts, cursor, scrolling & mouse, colors,
15
+ window layout, tab bar, bell, advanced and performance.
16
+ - Non-destructive `kitty.conf` read/write: targeted regex updates, timestamped
17
+ backup before every save, best-effort hot-reload via `SIGUSR1`.
18
+ - Gettext-based i18n (pybabel) with English and French catalogues.
19
+ - pixi-managed development environment and `Makefile` (venv, translate,
20
+ new-lang, test, lint, format, dist, srcdist, version bumping).
21
+ - PyInstaller packaging (`PBKittyConfigStudio.spec`).
22
+ - `schema_builder/`: a standalone tool, decoupled from `src/`, that clones
23
+ and builds kitty from source and regenerates
24
+ `config/schema.json` directly from kitty's own
25
+ `kitty.options.definition.definition` object — `schema_builder/build_kitty.sh`
26
+ / `make kitty-schema-skeleton`. RST descriptions are cleaned to HTML
27
+ (`rst_clean.py`); the real option/group tree is merged with the app's
28
+ current schema (`merge_schema.py`), carrying over curator-owned fields
29
+ (`icon`, `app_type`, `label`) and marking anything new `"UNKNOWN"`.
30
+ - The settings schema covers **~237 kitty settings across 12 categories**,
31
+ mirroring kitty's own grouping — including a subgroup for the color table
32
+ and one for mouse actions, rendered as in-page subsections.
33
+ - `config/__init__.py`: a startup guard (`SchemaNotCuratedError`) that
34
+ refuses to load a schema still containing the literal string `"UNKNOWN"`
35
+ anywhere, with a message listing every offending field — forces new
36
+ settings introduced by a kitty update to be curated before the app runs.
37
+ - `ui/widgets.py`: a multi-line list editor (`MultiLineSettingWidget`) for
38
+ repeatable settings (`font_features`, `modify_font`, and any other
39
+ `multi`-valued kitty setting).
40
+ - `ui/main_window.py`: a search box filtering settings by name/label across
41
+ every category, and a "default"/"modified" badge per row.
42
+ - `core/kitty_conf.py`: support for multi-value settings (every existing
43
+ line for a key is replaced by the full current set); a value equal to its
44
+ schema default is now written back as a commented-out line instead of an
45
+ active one (`kitty_conf.is_default_value()`, shared with the UI badge).
46
+ - `config/_babel_extractor.py`: a dedicated pybabel extraction method for
47
+ `schema.json` (group `title`, option `label`).
48
+ - `CODING.md`: developer-facing documentation of the schema generation/
49
+ curation pipeline, the `kitty.conf` read/write rules, and the i18n setup.
50
+ - "Restore Default Configuration…" File menu action: regenerates kitty's own
51
+ pristine, fully-commented example `kitty.conf` (by launching a throwaway
52
+ `kitty` instance and driving its remote-control `edit_config_file`
53
+ action, `core/kitty_conf.py:generate_default_config()`), then backs up and
54
+ overwrites the current file after a confirmation dialog. Disabled when no
55
+ `kitty` executable is found on `PATH` (`kitty_conf.kitty_available()`).
56
+ - PyInstaller executables carry the OS-level app icon: `.ico` embedded
57
+ in the Windows `EXE`, `.icns` in the macOS `.app` `BUNDLE`
58
+ (`PBKittyConfigStudio.spec`).
59
+ - `tools/update_icons.py` / `make update-icons`: syncs every bundled icon
60
+ (`resources/*.svg`, the app `.png`/`.ico`/`.icns`) from the `PBIcons`
61
+ project — a local sibling checkout if present, else GitHub.
62
+ - PyPI publishing: `make pypi-build` / `publish-pypi` / `publish-testpypi` /
63
+ `verify-pypi` / `verify-testpypi` targets (`build`/`twine`, see
64
+ `CODING.md`'s "Publishing to PyPI").
65
+ - `.markdownlint-cli2.yaml`: disables MD013 line-length checking for table
66
+ rows only (unwrappable without breaking table syntax), keeping the
67
+ 80-column limit for prose.
@@ -0,0 +1,71 @@
1
+ # CLAUDE.md
2
+
3
+ ## Mode
4
+
5
+ `full-en` — code and all communication in English.
6
+
7
+ ## Project
8
+
9
+ Desktop GUI for configuring the [kitty](https://github.com/kovidgoyal/kitty) terminal.
10
+ Python 3.12+, PySide6 (Qt6), src layout.
11
+ Author: Marcel Spock <mrspock@cardolan.net> | License: GPL-3.0-or-later
12
+
13
+ ## Stack
14
+
15
+ - GUI: PySide6, hand-built widgets (no Qt Designer .ui files)
16
+ - Settings schema: `src/pb_kitty_config_studio/config/schema.json` —
17
+ generated directly from kitty's own option definitions by
18
+ `schema_builder/` (`make kitty-schema-skeleton`), then curated by hand for
19
+ the fields kitty has no equivalent for (`app_type`, `label`, `icon`,
20
+ `allow_auto`, `min`/`max`/`step`); the GUI form is generated entirely from
21
+ it. See `CODING.md` for the full pipeline — start there before touching a
22
+ setting.
23
+ - i18n: gettext via pybabel, plus a dedicated extraction method for
24
+ `schema.json`'s `label`/`title` strings (`config/_babel_extractor.py`)
25
+ - Tests: pytest (+ pytest-qt for anything that needs a QApplication)
26
+ - Lint: ruff (line-length 88, target py312)
27
+ - Env: pixi (conda-forge channel) — `make venv`
28
+ - Packaging: PyInstaller (`PBKittyConfigStudio.spec`) — `make dist`
29
+
30
+ ## Layout
31
+
32
+ ```text
33
+ schema_builder/ standalone tool: kitty source → config/schema.json
34
+ src/pb_kitty_config_studio/
35
+ ├── __init__.py version
36
+ ├── __main__.py CLI entry point / QApplication bootstrap
37
+ ├── i18n.py gettext bootstrap
38
+ ├── config/
39
+ │ ├── schema.json the settings schema (source of truth, generated + curated)
40
+ │ ├── _babel_extractor.py pulls label/title out of schema.json for pybabel
41
+ │ └── __init__.py schema loader (load_schema [+ UNKNOWN gate], iter_settings)
42
+ ├── core/
43
+ │ └── kitty_conf.py read/parse/write kitty.conf, backup, hot-reload
44
+ ├── ui/
45
+ │ ├── widgets.py one widget class per app_type
46
+ │ └── main_window.py sidebar + search + generated settings form
47
+ ├── resources/ bundled icon
48
+ └── locale/ gettext catalogues (en, fr, …)
49
+ ```
50
+
51
+ ## Commands
52
+
53
+ - `make venv` — create/update the pixi env
54
+ - `make run` — launch the app
55
+ - `make test` / `make lint` / `make format`
56
+ - `make kitty-schema-skeleton` — regenerate `config/schema.json` from kitty's source
57
+ - `make translate` — extract strings, update/compile .po → .mo
58
+ (`make new-lang LOCALE=xx` to add one)
59
+ - `make dist` / `make srcdist` — PyInstaller executable / source archive
60
+
61
+ ## Notes
62
+
63
+ - Every save writes the *entire* current form state to kitty.conf (matching
64
+ the original prototype's behaviour), not just changed keys; an existing
65
+ line is rewritten in place (including commented-out ones), everything else
66
+ in the file is left untouched. A value equal to its schema default is
67
+ written back as a commented-out line rather than an active one.
68
+ - A timestamped backup (`kitty.conf.bak_<ISO date>`) is written before every save.
69
+ - Reload is best-effort (`pkill -USR1 kitty`); failure is not fatal.
70
+ - The app refuses to start if `config/schema.json` still has any field set
71
+ to the literal `"UNKNOWN"` — see `CODING.md` for the curation workflow.