PBKittyConfigStudio 0.1.0__tar.gz → 0.2.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 (87) hide show
  1. pbkittyconfigstudio-0.2.0/.markdownlint-cli2.yaml +10 -0
  2. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/CHANGELOG.md +74 -0
  3. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/CLAUDE.md +9 -0
  4. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/CODING.md +37 -0
  5. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/Makefile +1 -1
  6. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/PBKittyConfigStudio.spec +19 -0
  7. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/PKG-INFO +12 -4
  8. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/README.md +8 -2
  9. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/pyproject.toml +4 -2
  10. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/schema_builder/extract_definition.py +43 -3
  11. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/schema_builder/merge_schema.py +8 -1
  12. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/__init__.py +1 -1
  13. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/__main__.py +11 -1
  14. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/config/schema.json +245 -0
  15. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/core/kitty_conf.py +25 -3
  16. pbkittyconfigstudio-0.2.0/src/pb_kitty_config_studio/locale/de/LC_MESSAGES/pb_kitty_config_studio.po +1295 -0
  17. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/locale/en/LC_MESSAGES/pb_kitty_config_studio.po +4 -1
  18. pbkittyconfigstudio-0.2.0/src/pb_kitty_config_studio/locale/es/LC_MESSAGES/pb_kitty_config_studio.po +1297 -0
  19. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/locale/fr/LC_MESSAGES/pb_kitty_config_studio.po +6 -3
  20. pbkittyconfigstudio-0.2.0/src/pb_kitty_config_studio/locale/it/LC_MESSAGES/pb_kitty_config_studio.po +1297 -0
  21. pbkittyconfigstudio-0.2.0/src/pb_kitty_config_studio/locale/ru/LC_MESSAGES/pb_kitty_config_studio.po +1295 -0
  22. pbkittyconfigstudio-0.2.0/src/pb_kitty_config_studio/locale/vi/LC_MESSAGES/pb_kitty_config_studio.po +1294 -0
  23. pbkittyconfigstudio-0.2.0/src/pb_kitty_config_studio/locale/zh_CN/LC_MESSAGES/pb_kitty_config_studio.po +1292 -0
  24. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/resources/__init__.py +6 -0
  25. pbkittyconfigstudio-0.2.0/src/pb_kitty_config_studio/resources/previous.svg +1 -0
  26. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/ui/main_window.py +105 -48
  27. pbkittyconfigstudio-0.2.0/tests/fixtures/README.md +35 -0
  28. pbkittyconfigstudio-0.2.0/tests/fixtures/kitty_default.conf +2468 -0
  29. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tests/test_auto_update.py +110 -0
  30. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tests/test_desktop.py +37 -0
  31. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tests/test_i18n.py +15 -3
  32. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tests/test_kitty_conf.py +126 -0
  33. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tests/test_main.py +15 -0
  34. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tests/test_main_window.py +74 -14
  35. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tests/test_resources.py +1 -0
  36. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tests/test_schema.py +11 -0
  37. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tests/test_schema_builder_extract_definition.py +58 -0
  38. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tests/test_schema_builder_merge_schema.py +24 -0
  39. pbkittyconfigstudio-0.1.0/.markdownlint-cli2.yaml +0 -5
  40. pbkittyconfigstudio-0.1.0/xx.txt +0 -58
  41. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  42. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  43. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/.github/workflows/ci.yml +0 -0
  44. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/.gitignore +0 -0
  45. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/.pre-commit-config.yaml +0 -0
  46. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/LICENSE +0 -0
  47. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/babel.cfg +0 -0
  48. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/hatch_build.py +0 -0
  49. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/pixi.lock +0 -0
  50. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/schema_builder/README.md +0 -0
  51. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/schema_builder/build_kitty.sh +0 -0
  52. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/schema_builder/build_schema.py +0 -0
  53. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/schema_builder/pixi.toml +0 -0
  54. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/schema_builder/rst_clean.py +0 -0
  55. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/argparse_qt.py +0 -0
  56. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/config/__init__.py +0 -0
  57. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/config/_babel_extractor.py +0 -0
  58. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/core/__init__.py +0 -0
  59. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/i18n.py +0 -0
  60. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/platform/__init__.py +0 -0
  61. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/platform/auto_update.py +0 -0
  62. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/platform/desktop.py +0 -0
  63. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/resources/cancel.svg +0 -0
  64. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/resources/clear-all-data.svg +0 -0
  65. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/resources/help-about.svg +0 -0
  66. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/resources/pbkittyconfigstudio.icns +0 -0
  67. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/resources/pbkittyconfigstudio.ico +0 -0
  68. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/resources/pbkittyconfigstudio.png +0 -0
  69. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/resources/quit.svg +0 -0
  70. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/resources/refresh.svg +0 -0
  71. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/resources/save-as.svg +0 -0
  72. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/resources/save.svg +0 -0
  73. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/ui/__init__.py +0 -0
  74. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/ui/about_dialog.py +0 -0
  75. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/src/pb_kitty_config_studio/ui/widgets.py +0 -0
  76. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tests/conftest.py +0 -0
  77. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tests/test_about_dialog.py +0 -0
  78. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tests/test_argparse_qt.py +0 -0
  79. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tests/test_babel_extractor.py +0 -0
  80. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tests/test_schema_builder_rst_clean.py +0 -0
  81. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tests/test_widgets.py +0 -0
  82. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tools/bump_version.py +0 -0
  83. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tools/extract_changelog.py +0 -0
  84. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tools/fix_po_files.py +0 -0
  85. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tools/git_version.sh +0 -0
  86. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tools/po_check.py +0 -0
  87. {pbkittyconfigstudio-0.1.0 → pbkittyconfigstudio-0.2.0}/tools/update_icons.py +0 -0
@@ -0,0 +1,10 @@
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
6
+ # Duplicate headings allowed when they live under different parent
7
+ # sections (standard Keep-a-Changelog pattern: ### Added, ### Fixed
8
+ # repeat per release).
9
+ MD024:
10
+ siblings_only: true
@@ -5,6 +5,80 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.2.0] - 2026-08-21
9
+
10
+ ### Added
11
+
12
+ - German, Spanish, Italian, Russian, Vietnamese and Simplified Chinese
13
+ translations (`de`, `es`, `it`, `ru`, `vi`, `zh_CN`), alongside the
14
+ existing English and French catalogues. Every translated string is
15
+ tagged `# ==AUTO== Automatically translated` pending human review (see
16
+ `CLAUDE.md`'s new "I18n" section); `grep -r "==AUTO=="` lists what's
17
+ still pending.
18
+ - Per-row "revert to saved value" button (`previous.svg`, next to the
19
+ existing "reset to default" one): restores just that setting to the
20
+ value currently on disk, without rereading the whole file and losing
21
+ other unsaved edits (`core/kitty_conf.py:values_equal()`,
22
+ `ui/main_window.py:_SettingRow`).
23
+ - `config/schema.json` now has a top-level `information` section (sibling
24
+ of `groups`), always regenerated fresh from kitty by
25
+ `schema_builder/extract_definition.py`: `total_parameters_detected` (every
26
+ `Option`/`MultiOption` kitty declares, kept + ignored) and
27
+ `ignored_parameters` (the names of the undocumented `Option`s skipped,
28
+ e.g. the 240 `color16`..`color255` slots). See `CODING.md`.
29
+ - The sidebar is now a tree instead of a flat category list: a subgroup
30
+ (e.g. "Color scheme"'s color table, "Mouse"'s mouse actions) is a child
31
+ node with its own settings page, rather than being folded into its
32
+ parent's page as an inline section. A category with a large subgroup no
33
+ longer turns into one giant scrolling page burying that subgroup's
34
+ settings far below the fold — each is now a direct, one-click sidebar
35
+ destination.
36
+ - `tests/fixtures/kitty_default.conf`: a frozen, real snapshot of kitty's
37
+ own generated example configuration, used to test
38
+ `parse_config()`/`apply_settings()` against realistic content (mixed
39
+ active/commented/bare-marker/`#:`-documentation lines) instead of only
40
+ hand-written snippets — a static asset, not regenerated in CI. See
41
+ `tests/fixtures/README.md` and `CODING.md`.
42
+
43
+ ### Changed
44
+
45
+ - Reworded the French about-dialog credits line, which repeated "kitty"
46
+ twice and read awkwardly ("... l'équipe de développement de kitty pour
47
+ le terminal kitty ...").
48
+
49
+ ### Fixed
50
+
51
+ - `language_name` for the English catalogue was left as the literal
52
+ string `"language_name"` instead of `"English"`, so the language
53
+ selector showed the raw code `en` instead of a name like every other
54
+ language.
55
+ - A setting whose only existing line was a bare `# key` marker with no
56
+ value at all (kitty's own generated example config writes these for
57
+ settings with no meaningful default to show, e.g. `# symbol_map`, `# env`
58
+ — 14 such settings in total) was written at the *end* of the file
59
+ instead of replacing that marker in place: the regex locating the line
60
+ to rewrite required at least one value after the key, so it never
61
+ matched a bare marker (`core/kitty_conf.py:_line_regex_for()` /
62
+ `_all_lines_regex_for()`).
63
+ - `pyproject.toml`'s `[project.urls]` pointed `Homepage` at kitty's own
64
+ repository instead of this project's (copy-paste leftover) — PyPI showed
65
+ the wrong project link. Added `Repository`/`Issues` alongside it.
66
+
67
+ ## [0.1.1] - 2026-08-21
68
+
69
+ ### Fixed
70
+
71
+ - PyInstaller Linux build: `--auto-update` (and any other HTTPS request)
72
+ failed with `error: could not reach GitHub: <urlopen error unknown url
73
+ type: https>`. PyInstaller's automatic shared-library resolution picked
74
+ up the *system* `libssl.so.3`/`libcrypto.so.3` (registered in ldconfig's
75
+ cache) instead of the pixi/conda environment's own copy that Python's
76
+ `_ssl` extension was actually built against (only reachable via its
77
+ RPATH) — silently bundling an older OpenSSL missing symbol versions
78
+ `_ssl` needs, which made `import ssl` fail and left `urllib` with no
79
+ HTTPS support at all. `PBKittyConfigStudio.spec` now force-includes the
80
+ environment's own `libssl.so.3`/`libcrypto.so.3` explicitly on Linux.
81
+
8
82
  ## [0.1.0] - 2026-08-21
9
83
 
10
84
  ### Added
@@ -58,6 +58,15 @@ src/pb_kitty_config_studio/
58
58
  (`make new-lang LOCALE=xx` to add one)
59
59
  - `make dist` / `make srcdist` — PyInstaller executable / source archive
60
60
 
61
+ ## I18n
62
+
63
+ ### Auto-translation markers
64
+
65
+ All auto-translated strings are tagged `==AUTO==` (format varies by
66
+ mechanism — see the `translations` and `update-translation` skills).
67
+ Remove the marker once a human has reviewed and validated the string.
68
+ Use `grep -r "==AUTO=="` to list pending strings.
69
+
61
70
  ## Notes
62
71
 
63
72
  - Every save writes the *entire* current form state to kitty.conf (matching
@@ -45,6 +45,21 @@ make kitty-schema-skeleton
45
45
  before overwriting it. See `schema_builder/README.md` for the build details
46
46
  (why kitty needs to be compiled, the Go/pixi setup, platform notes).
47
47
 
48
+ ### The `information` section
49
+
50
+ `schema.json` has a top-level `information` object, a sibling of `groups`,
51
+ always regenerated fresh from kitty (never curator-owned, no merging
52
+ needed — `merge_schema.py` passes it through as-is):
53
+
54
+ - **`total_parameters_detected`** — how many `Option`/`MultiOption`
55
+ parameters kitty declares in total, kept ones plus ignored ones. Key/mouse
56
+ bindings aren't parameters and are never counted here (see the schema
57
+ pipeline diagram above).
58
+ - **`ignored_parameters`** — the (sorted) names of every `Option` skipped
59
+ for being undocumented (`documented=False` — e.g. the 240
60
+ `color16`..`color255` slots). A `MultiOption` has no such per-item flag
61
+ and is always kept, so it never appears here.
62
+
48
63
  ### What's regenerated vs. what's curated
49
64
 
50
65
  Every field kitty itself declares is refreshed on every run: `name`,
@@ -223,6 +238,28 @@ directives, `include` lines) is left untouched.
223
238
  order they appear in `schema.json` — the same order `schema_builder`
224
239
  wrote them in, which itself mirrors kitty's own `definition.root_group`
225
240
  order.
241
+ - **Bare, valueless marker lines**: kitty's own generated example config
242
+ marks a setting with no meaningful default to show as just `# key`, no
243
+ value at all — the real example lives separately, in `#:`-prefixed
244
+ documentation lines (e.g. `# symbol_map` followed by
245
+ `#: E.g. symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols`). The
246
+ line-locating regexes treat the value as optional for exactly this
247
+ reason — a version that required at least one value after the key never
248
+ matched this shape, so saving such a setting appended it at the end of
249
+ the file instead of replacing the marker in place. See
250
+ `tests/fixtures/README.md`.
251
+
252
+ ### Testing against a real kitty.conf
253
+
254
+ `tests/fixtures/kitty_default.conf` is a frozen, byte-for-byte snapshot of
255
+ kitty's real generated example configuration (see
256
+ `tests/fixtures/README.md`) — used by `test_kitty_conf.py` to exercise
257
+ `parse_config()`/`apply_settings()` against realistic content no
258
+ hand-written snippet reliably covers (mixed active/commented/bare-marker/
259
+ `#:`-documentation lines). It's a static asset, refreshed manually and
260
+ deliberately, not regenerated in CI — doing so would need a real,
261
+ launchable `kitty` binary there, which every other test in this file
262
+ (mocked `subprocess.Popen`/`.run()`) is careful to avoid needing.
226
263
 
227
264
  ### Restoring kitty's default configuration
228
265
 
@@ -7,7 +7,7 @@ endif
7
7
  SRC := src
8
8
  LOCALE_DIR := src/pb_kitty_config_studio/locale
9
9
  POT_FILE := $(LOCALE_DIR)/pb_kitty_config_studio.pot
10
- PO_LOCALES := en fr
10
+ PO_LOCALES := en fr de es it ru vi zh_CN
11
11
 
12
12
  R := \033[0m
13
13
  B := \033[1m
@@ -80,6 +80,24 @@ _datas += [
80
80
  _windows_icon = "src/pb_kitty_config_studio/resources/pbkittyconfigstudio.ico"
81
81
  _macos_icon = "src/pb_kitty_config_studio/resources/pbkittyconfigstudio.icns"
82
82
 
83
+ # On Linux, PyInstaller's automatic shared-library resolution for the
84
+ # `_ssl`/`_hashlib` extensions has been observed to pick up the *system*
85
+ # libssl.so.3/libcrypto.so.3 (e.g. /usr/lib/x86_64-linux-gnu, registered in
86
+ # ldconfig's cache) instead of the pixi/conda environment's own copy that
87
+ # Python was actually built against (only reachable via `_ssl`'s RPATH, not
88
+ # ldconfig) — silently bundling an older OpenSSL that's missing symbol
89
+ # versions the extension needs, breaking every HTTPS request (urllib falls
90
+ # back to "unknown url type: https" once `import ssl` fails). Force the
91
+ # environment's own libraries in explicitly so they take precedence.
92
+ _binaries = []
93
+ if sys.platform == "linux":
94
+ _conda_lib_dir = Path(sys.base_prefix) / "lib"
95
+ _binaries = [
96
+ (str(_conda_lib_dir / name), ".")
97
+ for name in ("libssl.so.3", "libcrypto.so.3")
98
+ if (_conda_lib_dir / name).is_file()
99
+ ]
100
+
83
101
  # ---------------------------------------------------------------------------
84
102
  # Analysis
85
103
  # ---------------------------------------------------------------------------
@@ -90,6 +108,7 @@ a = Analysis(
90
108
  # tree even without an editable install in the build environment.
91
109
  pathex=["src"],
92
110
  datas=_datas,
111
+ binaries=_binaries,
93
112
  hiddenimports=[],
94
113
  hookspath=[],
95
114
  excludes=["tkinter", "unittest"],
@@ -1,8 +1,10 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: PBKittyConfigStudio
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: A desktop GUI for configuring the kitty terminal
5
- Project-URL: Homepage, https://github.com/kovidgoyal/kitty
5
+ Project-URL: Homepage, https://github.com/ppoilbarbe/PBKittyConfigStudio
6
+ Project-URL: Repository, https://github.com/ppoilbarbe/PBKittyConfigStudio
7
+ Project-URL: Issues, https://github.com/ppoilbarbe/PBKittyConfigStudio/issues
6
8
  Author-email: Marcel Spock <mrspock@cardolan.net>
7
9
  License-Expression: GPL-3.0-or-later
8
10
  License-File: LICENSE
@@ -57,10 +59,16 @@ Built with Python and PySide6 (Qt6), the app needs nothing else.
57
59
  switches, dropdowns, a font picker built on Qt's own font database (no
58
60
  shelling out to `fc-list`), and a list editor for repeatable settings
59
61
  such as `font_features`/`modify_font`.
62
+ - **A sidebar tree, not a flat list** — a subgroup (e.g. the color table
63
+ under "Color scheme", mouse actions under "Mouse") is its own entry with
64
+ its own settings page, so a category with a lot of settings never turns
65
+ into one giant scrolling page burying part of it below the fold.
60
66
  - **Search** — a search box above the sidebar filters settings by name or
61
67
  label across every category.
62
68
  - **Default vs. modified at a glance** — every row is badged "default" or
63
- "modified" against kitty's own default value.
69
+ "modified" against kitty's own default value, with one-click buttons to
70
+ reset it to that default or revert it to the value currently saved on
71
+ disk (without rereading the whole file and losing other unsaved edits).
64
72
  - **Non-destructive** — every save writes a timestamped backup
65
73
  (`kitty.conf.bak_<date>`) first, and rewrites existing lines (including
66
74
  commented-out ones) in place with a targeted regex, leaving comments and
@@ -72,7 +80,7 @@ Built with Python and PySide6 (Qt6), the app needs nothing else.
72
80
  fully-commented example `kitty.conf` (via a throwaway `kitty` instance)
73
81
  and overwrites the current file, behind a confirmation dialog and the
74
82
  usual timestamped backup.
75
- - **Translated UI** — English and French out of the box (see
83
+ - **Translated UI** — English and many other languages out of the box (see
76
84
  [Development](#development) to add a language).
77
85
  - **Stays in sync with kitty** — the settings schema is generated straight
78
86
  from kitty's own option definitions rather than hand-maintained; see
@@ -29,10 +29,16 @@ Built with Python and PySide6 (Qt6), the app needs nothing else.
29
29
  switches, dropdowns, a font picker built on Qt's own font database (no
30
30
  shelling out to `fc-list`), and a list editor for repeatable settings
31
31
  such as `font_features`/`modify_font`.
32
+ - **A sidebar tree, not a flat list** — a subgroup (e.g. the color table
33
+ under "Color scheme", mouse actions under "Mouse") is its own entry with
34
+ its own settings page, so a category with a lot of settings never turns
35
+ into one giant scrolling page burying part of it below the fold.
32
36
  - **Search** — a search box above the sidebar filters settings by name or
33
37
  label across every category.
34
38
  - **Default vs. modified at a glance** — every row is badged "default" or
35
- "modified" against kitty's own default value.
39
+ "modified" against kitty's own default value, with one-click buttons to
40
+ reset it to that default or revert it to the value currently saved on
41
+ disk (without rereading the whole file and losing other unsaved edits).
36
42
  - **Non-destructive** — every save writes a timestamped backup
37
43
  (`kitty.conf.bak_<date>`) first, and rewrites existing lines (including
38
44
  commented-out ones) in place with a targeted regex, leaving comments and
@@ -44,7 +50,7 @@ Built with Python and PySide6 (Qt6), the app needs nothing else.
44
50
  fully-commented example `kitty.conf` (via a throwaway `kitty` instance)
45
51
  and overwrites the current file, behind a confirmation dialog and the
46
52
  usual timestamped backup.
47
- - **Translated UI** — English and French out of the box (see
53
+ - **Translated UI** — English and many other languages out of the box (see
48
54
  [Development](#development) to add a language).
49
55
  - **Stays in sync with kitty** — the settings schema is generated straight
50
56
  from kitty's own option definitions rather than hand-maintained; see
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "PBKittyConfigStudio"
7
- version = "0.1.0"
7
+ version = "0.2.0"
8
8
  description = "A desktop GUI for configuring the kitty terminal"
9
9
  readme = "README.md"
10
10
  license = "GPL-3.0-or-later"
@@ -38,7 +38,9 @@ dev = [
38
38
  PBKittyConfigStudio = "pb_kitty_config_studio.__main__:main"
39
39
 
40
40
  [project.urls]
41
- Homepage = "https://github.com/kovidgoyal/kitty"
41
+ Homepage = "https://github.com/ppoilbarbe/PBKittyConfigStudio"
42
+ Repository = "https://github.com/ppoilbarbe/PBKittyConfigStudio"
43
+ Issues = "https://github.com/ppoilbarbe/PBKittyConfigStudio/issues"
42
44
 
43
45
  [tool.hatch.build.targets.wheel]
44
46
  packages = ["src/pb_kitty_config_studio"]
@@ -18,6 +18,12 @@ to be edited individually) are skipped too: they'd otherwise dominate the
18
18
  skeleton with entries no one curates by hand. ``MultiOption`` items have no
19
19
  such per-option flag and are always kept (there are only 12 of them and all
20
20
  are legitimate user-facing settings).
21
+
22
+ The returned skeleton carries a top-level ``information`` section (sibling
23
+ of ``groups``) reporting how many ``Option``/``MultiOption`` parameters
24
+ kitty declares in total (kept + ignored) and the names of the ones skipped
25
+ for being undocumented — key/mouse bindings aren't parameters and are never
26
+ counted there.
21
27
  """
22
28
 
23
29
  from __future__ import annotations
@@ -65,6 +71,29 @@ def _is_kept_option(it: Any) -> bool:
65
71
  return False
66
72
 
67
73
 
74
+ def _walk_parameters(group: Group) -> tuple[list[str], list[str]]:
75
+ """Recursively collect the names of every ``Option``/``MultiOption`` in
76
+ *group* and its subgroups, split into (kept, ignored).
77
+
78
+ "Ignored" here means specifically an undocumented ``Option`` (kitty
79
+ provides no such per-item flag for key/mouse bindings, which aren't
80
+ parameters at all and are never counted here — see the module
81
+ docstring).
82
+ """
83
+ kept: list[str] = []
84
+ ignored: list[str] = []
85
+ for it in group.items:
86
+ if isinstance(it, Group):
87
+ sub_kept, sub_ignored = _walk_parameters(it)
88
+ kept.extend(sub_kept)
89
+ ignored.extend(sub_ignored)
90
+ elif isinstance(it, MultiOption):
91
+ kept.append(it.name)
92
+ elif isinstance(it, Option):
93
+ (kept if it.documented else ignored).append(it.name)
94
+ return kept, ignored
95
+
96
+
68
97
  def _group_dict(group: Group) -> dict[str, Any]:
69
98
  options = [_option_dict(it) for it in group.items if _is_kept_option(it)]
70
99
  subgroups = [_group_dict(it) for it in group.items if isinstance(it, Group)]
@@ -87,8 +116,19 @@ def build_skeleton(definition: Any) -> dict[str, Any]:
87
116
  """Return a JSON-serializable skeleton of *definition* (a kitty
88
117
  ``kitty.conf.types.Definition``, e.g. ``kitty.options.definition.definition``).
89
118
  """
119
+ root_groups = [g for g in definition.root_group.items if isinstance(g, Group)]
120
+
121
+ kept_names: list[str] = []
122
+ ignored_names: list[str] = []
123
+ for g in root_groups:
124
+ kept, ignored = _walk_parameters(g)
125
+ kept_names.extend(kept)
126
+ ignored_names.extend(ignored)
127
+
90
128
  return {
91
- "groups": [
92
- _group_dict(g) for g in definition.root_group.items if isinstance(g, Group)
93
- ],
129
+ "information": {
130
+ "total_parameters_detected": len(kept_names) + len(ignored_names),
131
+ "ignored_parameters": sorted(ignored_names),
132
+ },
133
+ "groups": [_group_dict(g) for g in root_groups],
94
134
  }
@@ -134,8 +134,15 @@ def merge_schema(
134
134
  old_groups = _flatten_groups(existing_groups)
135
135
  old_options = _flatten_options(existing_groups)
136
136
  return {
137
+ # Always fresh from kitty, like every other kitty-owned field —
138
+ # never curator-owned, so no merging needed. Defaults to an empty
139
+ # placeholder for skeletons that predate this field (or minimal
140
+ # test fixtures) rather than raising.
141
+ "information": skeleton.get(
142
+ "information", {"total_parameters_detected": 0, "ignored_parameters": []}
143
+ ),
137
144
  "groups": [
138
145
  _merge_group(g, old_groups, old_options, top_level=True)
139
146
  for g in skeleton["groups"]
140
- ]
147
+ ],
141
148
  }
@@ -1,3 +1,3 @@
1
1
  """PBKittyConfigStudio — a desktop GUI for configuring the kitty terminal."""
2
2
 
3
- __version__ = "0.1.0"
3
+ __version__ = "0.2.0"
@@ -120,6 +120,16 @@ def main() -> None:
120
120
  print(message, file=sys.stderr)
121
121
  sys.exit(0 if ok else 1)
122
122
 
123
+ _run_gui(ns) # pragma: no cover — see _run_gui's docstring/comment
124
+
125
+
126
+ def _run_gui(ns: argparse.Namespace) -> None: # pragma: no cover
127
+ # Real Qt bootstrap: creates the process's one-and-only QApplication and
128
+ # runs its event loop. Not unit-testable — PySide6 raises ("libshiboken:
129
+ # Please destroy the QApplication singleton before creating a new
130
+ # QApplication instance") if a second QApplication is instantiated in the
131
+ # same process, which pytest-qt's session-wide `qapp` fixture already
132
+ # is; this path is instead exercised by manually running the built app.
123
133
  from PySide6.QtGui import QIcon
124
134
  from PySide6.QtWidgets import QApplication
125
135
 
@@ -149,5 +159,5 @@ def main() -> None:
149
159
  sys.exit(app.exec())
150
160
 
151
161
 
152
- if __name__ == "__main__":
162
+ if __name__ == "__main__": # pragma: no cover — thin script entry point
153
163
  main()
@@ -1,4 +1,249 @@
1
1
  {
2
+ "information": {
3
+ "total_parameters_detected": 477,
4
+ "ignored_parameters": [
5
+ "color100",
6
+ "color101",
7
+ "color102",
8
+ "color103",
9
+ "color104",
10
+ "color105",
11
+ "color106",
12
+ "color107",
13
+ "color108",
14
+ "color109",
15
+ "color110",
16
+ "color111",
17
+ "color112",
18
+ "color113",
19
+ "color114",
20
+ "color115",
21
+ "color116",
22
+ "color117",
23
+ "color118",
24
+ "color119",
25
+ "color120",
26
+ "color121",
27
+ "color122",
28
+ "color123",
29
+ "color124",
30
+ "color125",
31
+ "color126",
32
+ "color127",
33
+ "color128",
34
+ "color129",
35
+ "color130",
36
+ "color131",
37
+ "color132",
38
+ "color133",
39
+ "color134",
40
+ "color135",
41
+ "color136",
42
+ "color137",
43
+ "color138",
44
+ "color139",
45
+ "color140",
46
+ "color141",
47
+ "color142",
48
+ "color143",
49
+ "color144",
50
+ "color145",
51
+ "color146",
52
+ "color147",
53
+ "color148",
54
+ "color149",
55
+ "color150",
56
+ "color151",
57
+ "color152",
58
+ "color153",
59
+ "color154",
60
+ "color155",
61
+ "color156",
62
+ "color157",
63
+ "color158",
64
+ "color159",
65
+ "color16",
66
+ "color160",
67
+ "color161",
68
+ "color162",
69
+ "color163",
70
+ "color164",
71
+ "color165",
72
+ "color166",
73
+ "color167",
74
+ "color168",
75
+ "color169",
76
+ "color17",
77
+ "color170",
78
+ "color171",
79
+ "color172",
80
+ "color173",
81
+ "color174",
82
+ "color175",
83
+ "color176",
84
+ "color177",
85
+ "color178",
86
+ "color179",
87
+ "color18",
88
+ "color180",
89
+ "color181",
90
+ "color182",
91
+ "color183",
92
+ "color184",
93
+ "color185",
94
+ "color186",
95
+ "color187",
96
+ "color188",
97
+ "color189",
98
+ "color19",
99
+ "color190",
100
+ "color191",
101
+ "color192",
102
+ "color193",
103
+ "color194",
104
+ "color195",
105
+ "color196",
106
+ "color197",
107
+ "color198",
108
+ "color199",
109
+ "color20",
110
+ "color200",
111
+ "color201",
112
+ "color202",
113
+ "color203",
114
+ "color204",
115
+ "color205",
116
+ "color206",
117
+ "color207",
118
+ "color208",
119
+ "color209",
120
+ "color21",
121
+ "color210",
122
+ "color211",
123
+ "color212",
124
+ "color213",
125
+ "color214",
126
+ "color215",
127
+ "color216",
128
+ "color217",
129
+ "color218",
130
+ "color219",
131
+ "color22",
132
+ "color220",
133
+ "color221",
134
+ "color222",
135
+ "color223",
136
+ "color224",
137
+ "color225",
138
+ "color226",
139
+ "color227",
140
+ "color228",
141
+ "color229",
142
+ "color23",
143
+ "color230",
144
+ "color231",
145
+ "color232",
146
+ "color233",
147
+ "color234",
148
+ "color235",
149
+ "color236",
150
+ "color237",
151
+ "color238",
152
+ "color239",
153
+ "color24",
154
+ "color240",
155
+ "color241",
156
+ "color242",
157
+ "color243",
158
+ "color244",
159
+ "color245",
160
+ "color246",
161
+ "color247",
162
+ "color248",
163
+ "color249",
164
+ "color25",
165
+ "color250",
166
+ "color251",
167
+ "color252",
168
+ "color253",
169
+ "color254",
170
+ "color255",
171
+ "color26",
172
+ "color27",
173
+ "color28",
174
+ "color29",
175
+ "color30",
176
+ "color31",
177
+ "color32",
178
+ "color33",
179
+ "color34",
180
+ "color35",
181
+ "color36",
182
+ "color37",
183
+ "color38",
184
+ "color39",
185
+ "color40",
186
+ "color41",
187
+ "color42",
188
+ "color43",
189
+ "color44",
190
+ "color45",
191
+ "color46",
192
+ "color47",
193
+ "color48",
194
+ "color49",
195
+ "color50",
196
+ "color51",
197
+ "color52",
198
+ "color53",
199
+ "color54",
200
+ "color55",
201
+ "color56",
202
+ "color57",
203
+ "color58",
204
+ "color59",
205
+ "color60",
206
+ "color61",
207
+ "color62",
208
+ "color63",
209
+ "color64",
210
+ "color65",
211
+ "color66",
212
+ "color67",
213
+ "color68",
214
+ "color69",
215
+ "color70",
216
+ "color71",
217
+ "color72",
218
+ "color73",
219
+ "color74",
220
+ "color75",
221
+ "color76",
222
+ "color77",
223
+ "color78",
224
+ "color79",
225
+ "color80",
226
+ "color81",
227
+ "color82",
228
+ "color83",
229
+ "color84",
230
+ "color85",
231
+ "color86",
232
+ "color87",
233
+ "color88",
234
+ "color89",
235
+ "color90",
236
+ "color91",
237
+ "color92",
238
+ "color93",
239
+ "color94",
240
+ "color95",
241
+ "color96",
242
+ "color97",
243
+ "color98",
244
+ "color99"
245
+ ]
246
+ },
2
247
  "groups": [
3
248
  {
4
249
  "name": "fonts",