PBKittyConfigStudio 0.5.0__tar.gz → 0.7.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.
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/CHANGELOG.md +136 -6
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/CODING.md +106 -26
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/PBKittyConfigStudio.spec +6 -2
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/PKG-INFO +1 -1
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/hatch_build.py +6 -5
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/pyproject.toml +2 -1
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/schema_builder/README.md +8 -1
- pbkittyconfigstudio-0.7.0/schema_builder/build_key_names.py +84 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/schema_builder/build_kitty.sh +20 -3
- pbkittyconfigstudio-0.7.0/schema_builder/extract_key_names.py +70 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/schema_builder/pixi.lock +17 -53
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/schema_builder/pixi.toml +1 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/__init__.py +1 -1
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/__main__.py +15 -12
- pbkittyconfigstudio-0.7.0/src/pb_kitty_config_studio/app_settings.py +68 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/config/__init__.py +18 -5
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/config/actions.json +25 -0
- pbkittyconfigstudio-0.7.0/src/pb_kitty_config_studio/config/key_names.json +642 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/config/kitty_default.conf +401 -110
- pbkittyconfigstudio-0.7.0/src/pb_kitty_config_studio/config/kitty_version.json +4 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/config/schema.json +127 -60
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/core/actions.py +12 -9
- pbkittyconfigstudio-0.7.0/src/pb_kitty_config_studio/core/key_names.py +171 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/core/kitty_conf.py +1 -1
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/core/mappings.py +36 -16
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/i18n.py +5 -5
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/locale/de/LC_MESSAGES/pb_kitty_config_studio.po +108 -20
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/locale/en/LC_MESSAGES/pb_kitty_config_studio.po +82 -17
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/locale/es/LC_MESSAGES/pb_kitty_config_studio.po +108 -20
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/locale/fr/LC_MESSAGES/pb_kitty_config_studio.po +86 -19
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/locale/it/LC_MESSAGES/pb_kitty_config_studio.po +108 -20
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/locale/ru/LC_MESSAGES/pb_kitty_config_studio.po +108 -20
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/locale/vi/LC_MESSAGES/pb_kitty_config_studio.po +108 -20
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/locale/zh_CN/LC_MESSAGES/pb_kitty_config_studio.po +106 -20
- pbkittyconfigstudio-0.7.0/src/pb_kitty_config_studio/platform/xdg.py +48 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/resources/__init__.py +46 -1
- pbkittyconfigstudio-0.7.0/src/pb_kitty_config_studio/resources/collapse-all.svg +1 -0
- pbkittyconfigstudio-0.7.0/src/pb_kitty_config_studio/resources/expand-all.svg +1 -0
- pbkittyconfigstudio-0.7.0/src/pb_kitty_config_studio/resources/help-config-options.svg +1 -0
- pbkittyconfigstudio-0.7.0/src/pb_kitty_config_studio/resources/help-user-manual.svg +1 -0
- pbkittyconfigstudio-0.7.0/src/pb_kitty_config_studio/resources/next.svg +1 -0
- pbkittyconfigstudio-0.7.0/src/pb_kitty_config_studio/resources/preferences-system.svg +1 -0
- pbkittyconfigstudio-0.7.0/src/pb_kitty_config_studio/resources/search.svg +1 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/ui/main_window.py +430 -75
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/ui/mapping_dialogs.py +15 -2
- pbkittyconfigstudio-0.7.0/src/pb_kitty_config_studio/ui/preferences_dialog.py +88 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/conftest.py +23 -1
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/fixtures/README.md +1 -1
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/test_actions.py +27 -25
- pbkittyconfigstudio-0.7.0/tests/test_app_settings.py +57 -0
- pbkittyconfigstudio-0.7.0/tests/test_key_names.py +134 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/test_main.py +35 -15
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/test_main_window.py +608 -38
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/test_mapping_dialogs.py +29 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/test_mappings.py +49 -16
- pbkittyconfigstudio-0.7.0/tests/test_preferences_dialog.py +134 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/test_resources.py +7 -0
- pbkittyconfigstudio-0.7.0/tests/test_schema_builder_extract_key_names.py +41 -0
- pbkittyconfigstudio-0.7.0/tests/test_xdg.py +62 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tools/extract_changelog.py +12 -2
- pbkittyconfigstudio-0.5.0/src/pb_kitty_config_studio/config/kitty_version.json +0 -4
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/.github/workflows/ci.yml +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/.gitignore +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/.markdownlint-cli2.yaml +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/.pre-commit-config.yaml +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/CLAUDE.md +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/LICENSE +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/Makefile +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/README.md +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/babel.cfg +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/hooks/pyi_rth_fonts.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/pixi.lock +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/schema_builder/build_actions.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/schema_builder/build_default_config.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/schema_builder/build_schema.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/schema_builder/extract_actions.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/schema_builder/extract_definition.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/schema_builder/kitty_python.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/schema_builder/merge_schema.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/schema_builder/rst_clean.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/schema_builder/xx +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/schema_builder/xx.bak_2026-08-27T13-04-19 +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/argparse_qt.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/config/_babel_extractor.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/core/__init__.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/platform/__init__.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/platform/auto_update.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/platform/desktop.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/resources/cancel.svg +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/resources/clear-all-data.svg +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/resources/help-about.svg +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/resources/pbkittyconfigstudio.icns +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/resources/pbkittyconfigstudio.ico +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/resources/pbkittyconfigstudio.png +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/resources/previous.svg +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/resources/quit.svg +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/resources/refresh.svg +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/resources/save-as.svg +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/resources/save.svg +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/ui/__init__.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/ui/about_dialog.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/src/pb_kitty_config_studio/ui/widgets.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/fixtures/kitty_default.conf +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/test_about_dialog.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/test_argparse_qt.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/test_auto_update.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/test_babel_extractor.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/test_desktop.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/test_i18n.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/test_kitty_conf.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/test_schema.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/test_schema_builder_extract_actions.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/test_schema_builder_extract_definition.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/test_schema_builder_kitty_python.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/test_schema_builder_merge_schema.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/test_schema_builder_rst_clean.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tests/test_widgets.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tools/bump_version.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tools/fix_po_files.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tools/git_version.sh +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tools/po_check.py +0 -0
- {pbkittyconfigstudio-0.5.0 → pbkittyconfigstudio-0.7.0}/tools/update_icons.py +0 -0
|
@@ -5,7 +5,137 @@ 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.
|
|
8
|
+
## [[0.7.0]](https://github.com/ppoilbarbe/PBKittyConfigStudio/compare/v0.6.0...v0.7.0) - 2026-11-29
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Settings for the 8 options introduced by kitty 0.51.1:
|
|
13
|
+
`detect_url_regex` (URL Detection Regex), `hyperlink_target_position`
|
|
14
|
+
(Hyperlink Target Position), `render_interval` (Render Interval),
|
|
15
|
+
`gpu_driver` (GPU Drivers), `window_border_radius` (Border Radius),
|
|
16
|
+
`collapse_window_margins` (Collapse Window Margins),
|
|
17
|
+
`restore_session_after_logout` (Restore Session After Logout) and
|
|
18
|
+
`ime_preedit_style` (IME Pre-edit Style).
|
|
19
|
+
- "Default Bindings…" window: every tab is now split into collapsible
|
|
20
|
+
sections (one per kitty group, e.g. "Clipboard", "Scrolling"), collapsed
|
|
21
|
+
by default; clicking a section heading expands or collapses it
|
|
22
|
+
(`ui/main_window.py:_CollapsibleSectionsBrowser`). New "Expand All" /
|
|
23
|
+
"Collapse All" buttons in the search bar act on the current tab
|
|
24
|
+
(`resources/expand-all.svg`/`collapse-all.svg`, copied from PBIcons). A
|
|
25
|
+
search first expands the sections containing the searched text.
|
|
26
|
+
- "Default Bindings…" window: new "Key Names" tab, in English only, listing
|
|
27
|
+
every name kitty accepts in a mapping: modifiers and their aliases
|
|
28
|
+
(including `kitty_mod`, with the `kitty_mod` option's default), functional
|
|
29
|
+
keys grouped by family (navigation, function, keypad, media, modifier
|
|
30
|
+
keys pressed alone such as `left_super`), named characters (`plus`,
|
|
31
|
+
`space`…) and the other ways to name a key (plain characters, XKB names,
|
|
32
|
+
raw `0x` codes, `>` sequences). Its data, `config/key_names.json`, is
|
|
33
|
+
generated from kitty's own key-name tables by
|
|
34
|
+
`schema_builder/build_key_names.py` (`extract_key_names.py`), in the same
|
|
35
|
+
`make kitty-schema-skeleton` run as the other generated files.
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- Generated data refreshed from kitty 0.51.1 (`84a6e2096`, previously
|
|
40
|
+
0.48.2): `schema.json`, `actions.json` (new actions
|
|
41
|
+
`clear_bell_indicators`, `set_session`, `shader_event`,
|
|
42
|
+
`toggle_float_focus`, `toggle_floating_window`), `kitty_default.conf`
|
|
43
|
+
and `kitty_version.json`. The `repaint_delay`, `input_delay` and
|
|
44
|
+
`sync_to_monitor` settings are gone, removed by kitty
|
|
45
|
+
(`render_interval` replaces `repaint_delay` and `sync_to_monitor`).
|
|
46
|
+
- `core/mappings.py:default_bindings_html()` and
|
|
47
|
+
`core/actions.py:actions_reference_html()` are replaced by
|
|
48
|
+
`default_bindings_sections()`/`actions_reference_sections()`, returning
|
|
49
|
+
one `(title, body HTML)` pair per section instead of a single page.
|
|
50
|
+
- Links inside the "Default Bindings…" window's content now open in the
|
|
51
|
+
external browser.
|
|
52
|
+
- `schema_builder`: Go 1.27 (required by kitty's `go.mod`) and `fribidi`
|
|
53
|
+
(new kitty build dependency) in its pixi environment.
|
|
54
|
+
|
|
55
|
+
### Fixed
|
|
56
|
+
|
|
57
|
+
- `make kitty-schema-skeleton` failed with `AttributeError: module
|
|
58
|
+
'kitty.fast_data_types' has no attribute 'MOUSE_WHEEL_UP'` after kitty's
|
|
59
|
+
source was updated: `build_kitty.sh` reused any previously built
|
|
60
|
+
`fast_data_types` extension, even one compiled from older sources. It now
|
|
61
|
+
records the kitty commit each build was made from
|
|
62
|
+
(`kitty_source/.fast_data_types.build-commit`) and rebuilds when
|
|
63
|
+
`kitty_source` has moved to another commit.
|
|
64
|
+
- The Add/Edit Key Mapping dialog flagged any key combination ending with
|
|
65
|
+
a punctuation key (`ctrl+shift+)`, `kitty_mod+/`, `ctrl++`…) as invalid,
|
|
66
|
+
although kitty accepts any single character as a key. It also no longer
|
|
67
|
+
warns while a combination is still being typed (`kitty_mod+`, `ctrl+x>`).
|
|
68
|
+
|
|
69
|
+
## [[0.6.0]](https://github.com/ppoilbarbe/PBKittyConfigStudio/compare/v0.5.0...v0.6.0) - 2026-08-28
|
|
70
|
+
|
|
71
|
+
### Added
|
|
72
|
+
|
|
73
|
+
- **Preferences** dialog (`ui/preferences_dialog.py`), opened from a new
|
|
74
|
+
File > Preferences… menu action (`resources/preferences-system.svg`,
|
|
75
|
+
copied from PBIcons, bound to `Ctrl+,` — not
|
|
76
|
+
`QKeySequence.StandardKey.Preferences`, which on a Linux desktop with no
|
|
77
|
+
window-manager-defined `Ctrl+,` binding falls back to the XF86Settings
|
|
78
|
+
multimedia key and its oddly-localized display name): language override
|
|
79
|
+
(replaces the old top-level "&Language" menu) and logging verbosity
|
|
80
|
+
(`ERROR`/`WARNING`/`INFO`/`DEBUG`, default `INFO`).
|
|
81
|
+
- `MainWindow` and the "Default Bindings…" reference window now remember
|
|
82
|
+
their position and size across restarts, saved on close and restored on
|
|
83
|
+
next launch (`app_settings.py`:
|
|
84
|
+
`save_window_geometry()`/`load_window_geometry()`).
|
|
85
|
+
- `platform/xdg.py`: standard per-platform user config directory
|
|
86
|
+
(`$XDG_CONFIG_HOME/pbkittyconfigstudio` on Linux, `~/Library/Application
|
|
87
|
+
Support/PBKittyConfigStudio` on macOS, `%APPDATA%\PBKittyConfigStudio` on
|
|
88
|
+
Windows), independent of Qt's own org/app-name-based resolution.
|
|
89
|
+
- Icons and F1/F2 keyboard shortcuts on the Help menu's "kitty
|
|
90
|
+
Documentation" and "kitty Options Reference" actions
|
|
91
|
+
(`resources/help-user-manual.svg`/`help-config-options.svg`, copied from
|
|
92
|
+
PBIcons).
|
|
93
|
+
- Two toolbars, sharing their `QAction`s with the menus (`MainWindow.
|
|
94
|
+
_build_toolbars()`): Quit / Save / Save As… / Reread File / Restore
|
|
95
|
+
Default Configuration… / Preferences…, and kitty Documentation / kitty
|
|
96
|
+
Options Reference.
|
|
97
|
+
- Quitting (Quit action, toolbar, or closing the window) with unsaved
|
|
98
|
+
changes — to either settings or key/mouse mappings — now asks for
|
|
99
|
+
confirmation instead of silently discarding them
|
|
100
|
+
(`MainWindow._has_unsaved_changes()`/`closeEvent()`).
|
|
101
|
+
- A search bar in the "Default Bindings…" reference window (search field +
|
|
102
|
+
Search/Previous/Next toolbuttons, sized from
|
|
103
|
+
`QStyle.PixelMetric.PM_ToolBarIconSize` like the setting-row revert/reset
|
|
104
|
+
buttons — `resources/search.svg`/`next.svg`, copied from PBIcons;
|
|
105
|
+
`previous.svg` reused from the revert button): searches the currently
|
|
106
|
+
visible tab's text and selects a match, wrapping circularly at the
|
|
107
|
+
start/end of the document. When nothing matches, reports it in a dialog
|
|
108
|
+
and disables the Previous/Next buttons until the query changes or a
|
|
109
|
+
search succeeds.
|
|
110
|
+
|
|
111
|
+
### Changed
|
|
112
|
+
|
|
113
|
+
- Application settings (language override, and now window geometry and log
|
|
114
|
+
level) are stored under the platform's standard config directory instead
|
|
115
|
+
of `~/.config/cardolan/` on Linux — see `app_settings.py`/`platform/xdg.py`.
|
|
116
|
+
- Log messages now use the `AAAA-MM-JJ HH:MM:SS niveau message` format
|
|
117
|
+
(previously `HH:MM:SS niveau nom: message`), and default to `INFO`
|
|
118
|
+
instead of `WARNING` — the CLI's remaining one-shot `print()` calls
|
|
119
|
+
(`--auto-update`, `--install-desktop-entry`/`--uninstall-desktop-entry`,
|
|
120
|
+
the schema-not-curated startup error) are now logged at `INFO` instead.
|
|
121
|
+
- A setting row's revert/reset `QToolButton` icons now size themselves from
|
|
122
|
+
`QStyle.PixelMetric.PM_ToolBarIconSize` (matching the new toolbars, and
|
|
123
|
+
the current theme/OS) instead of a hardcoded 24x24.
|
|
124
|
+
|
|
125
|
+
### Fixed
|
|
126
|
+
|
|
127
|
+
- The Add/Edit Key/Mouse Mapping dialogs no longer block the separate
|
|
128
|
+
"Default Bindings…" reference window — they were application-modal
|
|
129
|
+
(`QDialog.exec()`'s default), which also blocked *every* other window in
|
|
130
|
+
the app, defeating the point of keeping that window open to copy from
|
|
131
|
+
while filling the dialog in. Switching the dialogs to window-modal alone
|
|
132
|
+
wasn't enough: Qt's window-modal blocking also covers the whole owned
|
|
133
|
+
sub-tree of the blocked window, and the reference window was a Qt child
|
|
134
|
+
of `MainWindow` — it no longer is (`MainWindow` still owns and closes it
|
|
135
|
+
explicitly, from `closeEvent()`, since Qt won't do that automatically
|
|
136
|
+
anymore).
|
|
137
|
+
|
|
138
|
+
## [[0.5.0]](https://github.com/ppoilbarbe/PBKittyConfigStudio/compare/v0.4.1...v0.5.0) - 2026-08-27
|
|
9
139
|
|
|
10
140
|
### Added
|
|
11
141
|
|
|
@@ -93,7 +223,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
93
223
|
- `core/kitty_conf.py:kitty_available()` — no longer needed now that
|
|
94
224
|
nothing queries an installed `kitty` at runtime.
|
|
95
225
|
|
|
96
|
-
## [0.4.1] - 2026-08-26
|
|
226
|
+
## [[0.4.1]](https://github.com/ppoilbarbe/PBKittyConfigStudio/compare/v0.4.0...v0.4.1) - 2026-08-26
|
|
97
227
|
|
|
98
228
|
### Changed
|
|
99
229
|
|
|
@@ -122,7 +252,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
122
252
|
forced `FcInit()` re-scan that triggers this, since it's cosmetic and
|
|
123
253
|
can't be fixed without ownership of the directory.
|
|
124
254
|
|
|
125
|
-
## [0.4.0] - 2026-08-26
|
|
255
|
+
## [[0.4.0]](https://github.com/ppoilbarbe/PBKittyConfigStudio/compare/v0.3.0...v0.4.0) - 2026-08-26
|
|
126
256
|
|
|
127
257
|
### Changed
|
|
128
258
|
|
|
@@ -164,7 +294,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
164
294
|
reusing a persisted cache. The generated `fonts.conf` now points
|
|
165
295
|
`<cachedir>` at `$XDG_CACHE_HOME/fontconfig` (or `~/.cache/fontconfig`).
|
|
166
296
|
|
|
167
|
-
## [0.3.0] - 2026-08-25
|
|
297
|
+
## [[0.3.0]](https://github.com/ppoilbarbe/PBKittyConfigStudio/compare/v0.2.0...v0.3.0) - 2026-08-25
|
|
168
298
|
|
|
169
299
|
### Changed
|
|
170
300
|
|
|
@@ -188,7 +318,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
188
318
|
startup so other rendering settings (anti-aliasing, hinting, …) are still
|
|
189
319
|
inherited from the target system.
|
|
190
320
|
|
|
191
|
-
## [0.2.0] - 2026-08-21
|
|
321
|
+
## [[0.2.0]](https://github.com/ppoilbarbe/PBKittyConfigStudio/compare/v0.1.1...v0.2.0) - 2026-08-21
|
|
192
322
|
|
|
193
323
|
### Added
|
|
194
324
|
|
|
@@ -247,7 +377,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
247
377
|
repository instead of this project's (copy-paste leftover) — PyPI showed
|
|
248
378
|
the wrong project link. Added `Repository`/`Issues` alongside it.
|
|
249
379
|
|
|
250
|
-
## [0.1.1] - 2026-08-21
|
|
380
|
+
## [[0.1.1]](https://github.com/ppoilbarbe/PBKittyConfigStudio/compare/v0.1.0...v0.1.1) - 2026-08-21
|
|
251
381
|
|
|
252
382
|
### Fixed
|
|
253
383
|
|
|
@@ -5,20 +5,21 @@ overview (features, install, quick start), see [README.md](README.md).
|
|
|
5
5
|
|
|
6
6
|
## Architecture in one paragraph
|
|
7
7
|
|
|
8
|
-
`config/schema.json` is the single source of truth for every setting the
|
|
9
|
-
|
|
8
|
+
`config/schema.json` is the single source of truth for every setting the GUI
|
|
9
|
+
exposes: it drives both the generated form (`ui/main_window.py`,
|
|
10
10
|
`ui/widgets.py`) and the read/write logic for `kitty.conf`
|
|
11
11
|
(`core/kitty_conf.py`). It is *generated*, not hand-written from scratch —
|
|
12
12
|
`schema_builder/` regenerates it directly from kitty's own option
|
|
13
|
-
definitions, and a programmer curates the handful of fields kitty's data
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
definitions, and a programmer curates the handful of fields kitty's data has
|
|
14
|
+
no equivalent for. `config/actions.json` (kitty's action registry, for the
|
|
15
|
+
"Actions" reference tab), `config/key_names.json` (kitty's key and modifier
|
|
16
|
+
names, for the "Key Names" reference tab), `config/kitty_default.conf`
|
|
17
|
+
(kitty's pristine example config, for "Restore Default Configuration…" and
|
|
18
|
+
the "Default Bindings…" window) and `config/kitty_version.json` (which kitty
|
|
19
|
+
revision all of the above came from, shown in the About dialog) are
|
|
20
|
+
generated by the same tool, from the same kitty checkout, with no curation
|
|
21
|
+
step — so the app never needs a real kitty installed, and never mixes data
|
|
22
|
+
from different kitty versions. This file describes that whole loop.
|
|
22
23
|
|
|
23
24
|
## The schema pipeline
|
|
24
25
|
|
|
@@ -87,9 +88,38 @@ options, default bindings' action names, and this reference tab can never
|
|
|
87
88
|
drift apart by having been captured from different kitty versions on
|
|
88
89
|
different machines. `config/kitty_default.conf` (see "kitty's default
|
|
89
90
|
configuration and bindings" below) is generated the same way and for the
|
|
90
|
-
same reason — none of the
|
|
91
|
+
same reason — none of the generated files, nor the app itself, ever
|
|
91
92
|
queries a real kitty installation anymore.
|
|
92
93
|
|
|
94
|
+
### The key names pipeline
|
|
95
|
+
|
|
96
|
+
`config/key_names.json` — the data behind the same window's "Key Names"
|
|
97
|
+
tab (`core/key_names.py`) — follows exactly the same no-merge, no-curation
|
|
98
|
+
pattern, written by `schema_builder/build_key_names.py` in the same run:
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
kitty's own key-name tables (upstream, cloned into kitty_source/):
|
|
102
|
+
kitty.fast_data_types GLFW_MOD_* (modifier bits), kitty.options.utils
|
|
103
|
+
mod_map (modifier aliases, incl. kitty_mod), the kitty_mod option's
|
|
104
|
+
default, gen/key_constants.py functional_key_names, kitty.key_names
|
|
105
|
+
functional/character key name aliases
|
|
106
|
+
|
|
|
107
|
+
v
|
|
108
|
+
schema_builder/extract_key_names.py -- pure: modifiers in bit order with
|
|
109
|
+
| their aliases, functional keys in kitty's order with theirs,
|
|
110
|
+
| character names grouped per character
|
|
111
|
+
v
|
|
112
|
+
src/pb_kitty_config_studio/config/key_names.json (committed to the repo)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
`core/key_names.py` splits the functional keys into a few families
|
|
116
|
+
(navigation, function, keypad, media, modifier keys pressed alone) by name
|
|
117
|
+
pattern, and adds short notes and an "Other key names" section (plain
|
|
118
|
+
characters, XKB names, raw `0x` codes, `>` sequences) paraphrasing kitty's
|
|
119
|
+
`docs/mapping.rst`. That tab is deliberately **English only**, untranslated
|
|
120
|
+
like the kitty-sourced content of the window's other tabs: these are the
|
|
121
|
+
names to type in `kitty.conf`, whatever the UI language.
|
|
122
|
+
|
|
93
123
|
### The `information` section
|
|
94
124
|
|
|
95
125
|
`schema.json` has a top-level `information` object, a sibling of `groups`,
|
|
@@ -367,16 +397,24 @@ Two features consume `generate_default_config()`:
|
|
|
367
397
|
- The Mappings tab's "Default Bindings…" button (`ui/main_window.py`'s
|
|
368
398
|
`_DefaultBindingsWindow`, one non-modal singleton with "Keyboard
|
|
369
399
|
Shortcuts"/"Mouse"/"Actions" tabs): the first two come from
|
|
370
|
-
`core/mappings.py`'s `
|
|
400
|
+
`core/mappings.py`'s `default_bindings_sections()`, which parses the
|
|
371
401
|
`# map ...`/`# mouse_map ...` comment blocks kitty documents its
|
|
372
402
|
compiled-in bindings with (grouped under `#: Title {{{`/`#: }}}`
|
|
373
403
|
sections, one optional `#::`-prefixed long description each) into a small
|
|
374
404
|
read-only HTML reference — real, copy-pasteable examples of every
|
|
375
405
|
default shortcut, since none of them show up in a user's own
|
|
376
406
|
`kitty.conf` unless overridden. "Actions" comes from
|
|
377
|
-
`core/actions.py:
|
|
378
|
-
HTML `config/actions.json` carries (see "The action
|
|
379
|
-
above) — no parsing needed at this point, unlike the
|
|
407
|
+
`core/actions.py:actions_reference_sections()`, assembling the
|
|
408
|
+
already-clean HTML `config/actions.json` carries (see "The action
|
|
409
|
+
registry pipeline" above) — no parsing needed at this point, unlike the
|
|
410
|
+
other two tabs. Both return `(title, body HTML)` pairs, one per kitty
|
|
411
|
+
group, rather than one HTML page: each tab is a
|
|
412
|
+
`_CollapsibleSectionsBrowser` that shows them collapsed by default and
|
|
413
|
+
toggles one when its heading is clicked. Qt's rich-text engine has no
|
|
414
|
+
`<details>`, so it re-renders the document with only the expanded
|
|
415
|
+
sections' bodies; since a collapsed section's text isn't in the
|
|
416
|
+
document, the window's search first expands every section containing
|
|
417
|
+
the searched text (`expand_matching()`) before calling `find()`.
|
|
380
418
|
|
|
381
419
|
## Icons
|
|
382
420
|
|
|
@@ -389,6 +427,36 @@ icon, `.ico`/`.icns` for the PyInstaller-built Windows executable and macOS
|
|
|
389
427
|
`PBIcons` checkout sibling to this repo's root if present, else from
|
|
390
428
|
PBIcons' GitHub repository — run it after an icon changes upstream.
|
|
391
429
|
|
|
430
|
+
## Application settings
|
|
431
|
+
|
|
432
|
+
`app_settings.py` is the single place that owns the app's persistent
|
|
433
|
+
QSettings instance — window geometry (`MainWindow`, `_DefaultBindingsWindow`)
|
|
434
|
+
and the logging verbosity preference (`ERROR`/`WARNING`/`INFO`/`DEBUG`,
|
|
435
|
+
default `INFO`, exposed via `ui/preferences_dialog.py`'s "Log level" combo).
|
|
436
|
+
The language override (`i18n.get_language_override()`/
|
|
437
|
+
`set_language_override()`) is stored through the same instance, though
|
|
438
|
+
`i18n.py` still owns that key.
|
|
439
|
+
|
|
440
|
+
The backing file lives under `platform/xdg.py:config_dir()` — the
|
|
441
|
+
platform's standard per-user config directory
|
|
442
|
+
(`$XDG_CONFIG_HOME/pbkittyconfigstudio` on Linux, falling back to
|
|
443
|
+
`~/.config/pbkittyconfigstudio`; `~/Library/Application Support/PBKittyConfigStudio`
|
|
444
|
+
on macOS; `%APPDATA%\PBKittyConfigStudio` on Windows) — rather than
|
|
445
|
+
`QStandardPaths`/`QSettings`' own org+app-name-based location
|
|
446
|
+
(`~/.config/cardolan/PBKittyConfigStudio.conf` on Linux prior to this),
|
|
447
|
+
since that coupling is exactly what `xdg.py` exists to remove: every
|
|
448
|
+
consumer resolves the same path independent of what's registered on the
|
|
449
|
+
running `QApplication`.
|
|
450
|
+
|
|
451
|
+
`MainWindow`/`_DefaultBindingsWindow` save their geometry (x, y, width,
|
|
452
|
+
height) from `closeEvent()` and restore it in `__init__()`, falling back to
|
|
453
|
+
the hardcoded default size when nothing was saved yet (first run, or an
|
|
454
|
+
older settings file predating this feature). **Tests never exercise the
|
|
455
|
+
real settings file** — `tests/conftest.py`'s autouse `_isolated_app_settings`
|
|
456
|
+
fixture points `app_settings.settings()` at a per-test `tmp_path` INI file,
|
|
457
|
+
since `qtbot.addWidget()` closes every registered window at teardown
|
|
458
|
+
(firing the real `closeEvent`).
|
|
459
|
+
|
|
392
460
|
## i18n
|
|
393
461
|
|
|
394
462
|
Only two kinds of string are translated: an option's `label` and a group's
|
|
@@ -445,7 +513,7 @@ Since `.mo` catalogues are gitignored (see [i18n](#i18n) above), the
|
|
|
445
513
|
sources at wheel-build time and force-includes the result — without it, a
|
|
446
514
|
PyPI install would ship with no translations (`i18n.py`'s
|
|
447
515
|
`available_languages()` discovers languages by globbing `.mo` files). The
|
|
448
|
-
hook also force-includes `config
|
|
516
|
+
hook also force-includes the `config/` files `schema_builder` generates
|
|
449
517
|
(not picked up automatically by hatchling's normal "package code"
|
|
450
518
|
inclusion, being data files rather than Python source) and only runs for
|
|
451
519
|
the `wheel` target; `babel` is a `[build-system] requires` dependency so
|
|
@@ -458,51 +526,63 @@ schema_builder/ standalone tool, decoupled from src/ (see above)
|
|
|
458
526
|
|-- kitty_python.py re-exec under kitty's bundled Python (shared)
|
|
459
527
|
|-- extract_definition.py kitty options -> schema.json skeleton
|
|
460
528
|
|-- extract_actions.py kitty action registry -> actions.json skeleton
|
|
529
|
+
|-- extract_key_names.py kitty key-name tables -> key_names.json skeleton
|
|
461
530
|
|-- merge_schema.py merges fresh options with curated schema.json fields
|
|
462
531
|
|-- rst_clean.py kitty's RST prose -> HTML
|
|
463
532
|
|-- build_schema.py orchestrates the schema.json pipeline
|
|
464
533
|
|-- build_actions.py orchestrates the actions.json pipeline
|
|
534
|
+
|-- build_key_names.py orchestrates the key_names.json pipeline
|
|
465
535
|
`-- build_default_config.py orchestrates kitty_default.conf + kitty_version.json
|
|
466
536
|
src/pb_kitty_config_studio/
|
|
467
537
|
|-- __main__.py CLI entry point (`python -m
|
|
468
538
|
| pb_kitty_config_studio` / the packaged
|
|
469
539
|
| executable): arg parsing, QApplication bootstrap
|
|
470
540
|
|-- __init__.py package version
|
|
541
|
+
|-- app_settings.py persistent QSettings (window geometry, log
|
|
542
|
+
| level) backed by platform/xdg.py
|
|
471
543
|
|-- i18n.py gettext bootstrap: language detection/override,
|
|
472
|
-
| installs `_()`
|
|
544
|
+
| installs `_()` — persistence delegated to
|
|
545
|
+
| app_settings.py
|
|
473
546
|
|-- argparse_qt.py argparse helpers for Qt's own CLI flags
|
|
474
547
|
|-- config/
|
|
475
548
|
| |-- schema.json settings schema (source of truth,
|
|
476
549
|
| | generated + curated)
|
|
477
550
|
| |-- actions.json action registry (source of truth,
|
|
478
551
|
| | generated, no curation)
|
|
552
|
+
| |-- key_names.json key/modifier names (generated, no curation)
|
|
479
553
|
| |-- kitty_default.conf kitty's pristine example config
|
|
480
554
|
| | (generated, no curation)
|
|
481
|
-
| |-- kitty_version.json kitty_source revision all
|
|
555
|
+
| |-- kitty_version.json kitty_source revision all of these came from
|
|
482
556
|
| |-- _babel_extractor.py pulls label/title out of schema.json for pybabel
|
|
483
557
|
| `-- __init__.py load_schema() [+ UNKNOWN gate], load_actions(),
|
|
484
|
-
| load_default_config_text(), load_kitty_version(),
|
|
558
|
+
| load_key_names(), load_default_config_text(), load_kitty_version(),
|
|
485
559
|
| iter_settings()
|
|
486
560
|
|-- core/
|
|
487
561
|
| |-- kitty_conf.py read/parse/write kitty.conf, backup,
|
|
488
562
|
| | hot-reload, default config
|
|
489
563
|
| |-- mappings.py read/edit map/mouse_map, default-bindings
|
|
490
564
|
| | HTML reference
|
|
491
|
-
|
|
|
565
|
+
| |-- actions.py actions.json -> HTML reference (Actions tab)
|
|
566
|
+
| `-- key_names.py key_names.json -> HTML reference (Key Names tab)
|
|
492
567
|
|-- platform/
|
|
493
568
|
| |-- auto_update.py `--auto-update`: replace the running
|
|
494
569
|
| | PyInstaller executable with the latest GitHub
|
|
495
570
|
| | release (not meaningful for a source checkout
|
|
496
571
|
| | or pip/PyPI install, updated through their own
|
|
497
572
|
| | channel)
|
|
498
|
-
|
|
|
499
|
-
|
|
|
500
|
-
|
|
|
573
|
+
| |-- desktop.py opt-in `.desktop` menu-entry install for a
|
|
574
|
+
| | pip/PyPI install (Linux/XDG only -- a
|
|
575
|
+
| | PyInstaller build has no such hook either)
|
|
576
|
+
| `-- xdg.py per-platform standard user config directory
|
|
577
|
+
| (XDG on Linux, Application Support/%APPDATA%
|
|
578
|
+
| on macOS/Windows) backing app_settings.py
|
|
501
579
|
|-- ui/
|
|
502
580
|
| |-- widgets.py one widget class per app_type
|
|
503
581
|
| |-- mapping_dialogs.py add/edit dialogs for map/mouse_map
|
|
504
582
|
| |-- main_window.py sidebar + search + generated settings form +
|
|
505
583
|
| | Mappings tab
|
|
584
|
+
| |-- preferences_dialog.py language override + log level, opened from
|
|
585
|
+
| | File > Preferences
|
|
506
586
|
| `-- about_dialog.py About box, shows the kitty version settings
|
|
507
587
|
| are based on
|
|
508
588
|
|-- locale/ gettext catalogues (en, fr, ...)
|
|
@@ -512,12 +592,12 @@ src/pb_kitty_config_studio/
|
|
|
512
592
|
## Commands
|
|
513
593
|
|
|
514
594
|
- `make kitty-schema-skeleton` — regenerate `config/schema.json`,
|
|
515
|
-
`config/actions.json`, `config/kitty_default.conf` and
|
|
595
|
+
`config/actions.json`, `config/key_names.json`, `config/kitty_default.conf` and
|
|
516
596
|
`config/kitty_version.json` from kitty
|
|
517
597
|
- `make venv` / `make test` / `make lint` / `make format`
|
|
518
598
|
- `make translate` — extract + sync `.po`/`.mo` (see i18n above)
|
|
519
599
|
- `make update-icons` — sync bundled icons from `PBIcons` (see Icons above)
|
|
520
|
-
- `make dist` / `make srcdist` — packaging (all
|
|
600
|
+
- `make dist` / `make srcdist` — packaging (all five `schema_builder`-generated
|
|
521
601
|
files plus the `.mo` catalogues are bundled as data files, see
|
|
522
602
|
`hatch_build.py` / `PBKittyConfigStudio.spec`)
|
|
523
603
|
- `make pypi-build` / `publish-pypi` / `publish-testpypi` / `verify-pypi` /
|
|
@@ -66,8 +66,8 @@ _datas = [
|
|
|
66
66
|
]
|
|
67
67
|
|
|
68
68
|
# The bundled app icon, plus the schema_builder-generated data files
|
|
69
|
-
# (config/schema.json, config/actions.json, config/
|
|
70
|
-
# config/kitty_version.json), not part of the package's code, so they need
|
|
69
|
+
# (config/schema.json, config/actions.json, config/key_names.json,
|
|
70
|
+
# config/kitty_default.conf, config/kitty_version.json), not part of the package's code, so they need
|
|
71
71
|
# explicit data entries.
|
|
72
72
|
_datas += [
|
|
73
73
|
("src/pb_kitty_config_studio/resources", "pb_kitty_config_studio/resources"),
|
|
@@ -79,6 +79,10 @@ _datas += [
|
|
|
79
79
|
"src/pb_kitty_config_studio/config/actions.json",
|
|
80
80
|
"pb_kitty_config_studio/config",
|
|
81
81
|
),
|
|
82
|
+
(
|
|
83
|
+
"src/pb_kitty_config_studio/config/key_names.json",
|
|
84
|
+
"pb_kitty_config_studio/config",
|
|
85
|
+
),
|
|
82
86
|
(
|
|
83
87
|
"src/pb_kitty_config_studio/config/kitty_default.conf",
|
|
84
88
|
"pb_kitty_config_studio/config",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: PBKittyConfigStudio
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
4
4
|
Summary: A desktop GUI for configuring the kitty terminal
|
|
5
5
|
Project-URL: Homepage, https://github.com/ppoilbarbe/PBKittyConfigStudio
|
|
6
6
|
Project-URL: Repository, https://github.com/ppoilbarbe/PBKittyConfigStudio
|
|
@@ -5,11 +5,11 @@ build artifacts (see `make translate`). Without this hook, a wheel built for
|
|
|
5
5
|
PyPI would ship no .mo files and the app would silently fall back to English
|
|
6
6
|
(see i18n.py: available_languages() discovers languages by globbing *.mo).
|
|
7
7
|
|
|
8
|
-
It also force-includes the
|
|
9
|
-
(``config/schema.json``, ``config/actions.json``, ``config/
|
|
10
|
-
``config/kitty_version.json``): unlike the old
|
|
11
|
-
aren't picked up automatically by hatchling's
|
|
12
|
-
inclusion.
|
|
8
|
+
It also force-includes the five files ``schema_builder`` generates
|
|
9
|
+
(``config/schema.json``, ``config/actions.json``, ``config/key_names.json``,
|
|
10
|
+
``config/kitty_default.conf``, ``config/kitty_version.json``): unlike the old
|
|
11
|
+
``schema.py``, data files aren't picked up automatically by hatchling's
|
|
12
|
+
normal "package code" inclusion.
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
@@ -47,6 +47,7 @@ class TranslationsBuildHook(BuildHookInterface):
|
|
|
47
47
|
for filename in (
|
|
48
48
|
"schema.json",
|
|
49
49
|
"actions.json",
|
|
50
|
+
"key_names.json",
|
|
50
51
|
"kitty_default.conf",
|
|
51
52
|
"kitty_version.json",
|
|
52
53
|
):
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "PBKittyConfigStudio"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.7.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"
|
|
@@ -80,6 +80,7 @@ extend-select = [
|
|
|
80
80
|
"src/pb_kitty_config_studio/ui/main_window.py" = ["F821"]
|
|
81
81
|
"src/pb_kitty_config_studio/ui/mapping_dialogs.py" = ["F821"]
|
|
82
82
|
"src/pb_kitty_config_studio/ui/widgets.py" = ["F821"]
|
|
83
|
+
"src/pb_kitty_config_studio/ui/preferences_dialog.py" = ["F821"]
|
|
83
84
|
|
|
84
85
|
[tool.ruff.format]
|
|
85
86
|
quote-style = "double"
|
|
@@ -38,7 +38,14 @@ re-parsing it, so it stays correct across kitty's own DSL changes.
|
|
|
38
38
|
`config/actions.json` (`extract_actions.py`) — the data behind the
|
|
39
39
|
Mappings tab's "Default Bindings…" window's "Actions" tab. No merge, no
|
|
40
40
|
backup: every field comes straight from kitty, nothing to curate.
|
|
41
|
-
5. Run `
|
|
41
|
+
5. Run `build_key_names.py`, which imports kitty's key-name tables
|
|
42
|
+
(`GLFW_MOD_*` modifier bits, `kitty.options.utils.mod_map`,
|
|
43
|
+
`gen/key_constants.py`'s functional key names, `kitty.key_names`'
|
|
44
|
+
aliases, the `kitty_mod` option's default), turning them into
|
|
45
|
+
`config/key_names.json` (`extract_key_names.py`) — the data behind the
|
|
46
|
+
"Default Bindings…" window's "Key Names" tab. Same no-merge, no-backup
|
|
47
|
+
deal as `actions.json`.
|
|
48
|
+
6. Run `build_default_config.py`, which imports the real
|
|
42
49
|
`kitty.config.commented_out_default_config()` and
|
|
43
50
|
`kitty.constants.str_version`, writing `config/kitty_default.conf`
|
|
44
51
|
(kitty's pristine example config — used by "Restore Default
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Regenerate the app's ``config/key_names.json`` directly from kitty's own
|
|
3
|
+
key-name tables (modifiers, functional keys, character key aliases — see
|
|
4
|
+
``extract_key_names.py``).
|
|
5
|
+
|
|
6
|
+
Usage: python3 build_key_names.py [output.json]
|
|
7
|
+
|
|
8
|
+
Prerequisite: run ``build_kitty.sh`` first (same as ``build_actions.py`` —
|
|
9
|
+
this needs the same kitty_source build, and the same bundled-Python re-exec;
|
|
10
|
+
see ``kitty_python.py``).
|
|
11
|
+
|
|
12
|
+
Like ``actions.json``, nothing here is hand-curated: the file is always
|
|
13
|
+
regenerated from scratch, no merge with a previous version, no backup.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
import json
|
|
19
|
+
import sys
|
|
20
|
+
from pathlib import Path
|
|
21
|
+
|
|
22
|
+
from kitty_python import reexec_under_bundled_python
|
|
23
|
+
|
|
24
|
+
HERE = Path(__file__).resolve().parent
|
|
25
|
+
KITTY_SRC = HERE / "kitty_source"
|
|
26
|
+
APP_KEY_NAMES_PATH = (
|
|
27
|
+
HERE.parent / "src" / "pb_kitty_config_studio" / "config" / "key_names.json"
|
|
28
|
+
)
|
|
29
|
+
_MOD_PREFIX = "GLFW_MOD_"
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def main() -> None:
|
|
33
|
+
reexec_under_bundled_python(__file__)
|
|
34
|
+
|
|
35
|
+
sys.path.insert(0, str(KITTY_SRC))
|
|
36
|
+
sys.path.insert(0, str(HERE))
|
|
37
|
+
|
|
38
|
+
try:
|
|
39
|
+
from gen.key_constants import functional_key_names
|
|
40
|
+
from kitty import fast_data_types
|
|
41
|
+
from kitty.key_names import (
|
|
42
|
+
character_key_name_aliases,
|
|
43
|
+
functional_key_name_aliases,
|
|
44
|
+
)
|
|
45
|
+
from kitty.options.definition import definition
|
|
46
|
+
from kitty.options.utils import mod_map
|
|
47
|
+
except ImportError as exc:
|
|
48
|
+
sys.exit(
|
|
49
|
+
"Could not import kitty's key-name tables — is kitty_source built?"
|
|
50
|
+
f" Run {HERE / 'build_kitty.sh'} first.\n{exc}"
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
from extract_key_names import build_key_names_skeleton
|
|
54
|
+
|
|
55
|
+
modifier_bits = {
|
|
56
|
+
name.removeprefix(_MOD_PREFIX): getattr(fast_data_types, name)
|
|
57
|
+
for name in dir(fast_data_types)
|
|
58
|
+
if name.startswith(_MOD_PREFIX)
|
|
59
|
+
}
|
|
60
|
+
(kitty_mod,) = (o for o in definition.iter_all_options() if o.name == "kitty_mod")
|
|
61
|
+
|
|
62
|
+
skeleton = build_key_names_skeleton(
|
|
63
|
+
modifier_bits,
|
|
64
|
+
mod_map,
|
|
65
|
+
kitty_mod.defval_as_string,
|
|
66
|
+
list(functional_key_names),
|
|
67
|
+
functional_key_name_aliases,
|
|
68
|
+
character_key_name_aliases,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
out_path = Path(sys.argv[1]) if len(sys.argv) > 1 else APP_KEY_NAMES_PATH
|
|
72
|
+
out_path.parent.mkdir(parents=True, exist_ok=True)
|
|
73
|
+
out_path.write_text(
|
|
74
|
+
json.dumps(skeleton, indent=2, ensure_ascii=False) + "\n", encoding="utf-8"
|
|
75
|
+
)
|
|
76
|
+
print(
|
|
77
|
+
f"Wrote {out_path} ({len(skeleton['modifiers'])} modifiers,"
|
|
78
|
+
f" {len(skeleton['functional_keys'])} functional keys,"
|
|
79
|
+
f" {len(skeleton['character_names'])} named characters)"
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
if __name__ == "__main__":
|
|
84
|
+
main()
|
|
@@ -35,11 +35,23 @@ else
|
|
|
35
35
|
git -C "$KITTY_SRC" pull --ff-only
|
|
36
36
|
fi
|
|
37
37
|
|
|
38
|
+
# The compiled extension must match the Python sources it is imported with:
|
|
39
|
+
# a pull that changes kitty's C code (new constants, functions...) makes an
|
|
40
|
+
# older build unusable. Record the commit each build was made from, and
|
|
41
|
+
# rebuild whenever HEAD no longer matches it.
|
|
42
|
+
BUILD_STAMP="$KITTY_SRC/.fast_data_types.build-commit"
|
|
43
|
+
HEAD_COMMIT=$(git -C "$KITTY_SRC" rev-parse HEAD)
|
|
44
|
+
BUILT_COMMIT=$(cat "$BUILD_STAMP" 2>/dev/null || true)
|
|
38
45
|
ALREADY_BUILT=$(find "$KITTY_SRC/kitty" -maxdepth 1 -name "fast_data_types*.so" 2>/dev/null | head -1)
|
|
39
|
-
if [ -n "$ALREADY_BUILT" ] && [ "$
|
|
40
|
-
|
|
41
|
-
echo "
|
|
46
|
+
if [ -n "$ALREADY_BUILT" ] && [ "$BUILT_COMMIT" = "$HEAD_COMMIT" ] \
|
|
47
|
+
&& [ "${FORCE_REBUILD:-0}" != "1" ]; then
|
|
48
|
+
echo "kitty.fast_data_types already built for ${HEAD_COMMIT:0:12} — skipping build."
|
|
49
|
+
echo "(Set FORCE_REBUILD=1 to rebuild anyway.)"
|
|
42
50
|
else
|
|
51
|
+
if [ -n "$ALREADY_BUILT" ] && [ "$BUILT_COMMIT" != "$HEAD_COMMIT" ]; then
|
|
52
|
+
echo "kitty.fast_data_types was built for ${BUILT_COMMIT:-an unknown commit}," \
|
|
53
|
+
"kitty_source is now at ${HEAD_COMMIT:0:12} — rebuilding."
|
|
54
|
+
fi
|
|
43
55
|
echo "Building kitty from source (downloads prebuilt dependencies + Go modules on first run, a few minutes)..."
|
|
44
56
|
|
|
45
57
|
PIXI="$(command -v pixi || echo "$HOME/.pixi/bin/pixi")"
|
|
@@ -66,6 +78,7 @@ else
|
|
|
66
78
|
go run bypy/devenv.go build
|
|
67
79
|
'
|
|
68
80
|
)
|
|
81
|
+
echo "$HEAD_COMMIT" > "$BUILD_STAMP"
|
|
69
82
|
fi
|
|
70
83
|
|
|
71
84
|
echo
|
|
@@ -76,6 +89,10 @@ echo
|
|
|
76
89
|
echo "Extracting the action registry..."
|
|
77
90
|
python3 "$HERE/build_actions.py"
|
|
78
91
|
|
|
92
|
+
echo
|
|
93
|
+
echo "Extracting the key names..."
|
|
94
|
+
python3 "$HERE/build_key_names.py"
|
|
95
|
+
|
|
79
96
|
echo
|
|
80
97
|
echo "Extracting the default configuration and kitty version..."
|
|
81
98
|
python3 "$HERE/build_default_config.py"
|