3.3 KiB
spec, blocked-by
| spec | blocked-by |
|---|---|
| dot-kde | 0000-nested-subcommand-discovery |
What to build
Stand up dot kde itself: the fish dispatcher plus its Python helper,
living together under commands/kde/ per the nested-subcommand layout
from the prior task. Establish the manifest file (flat text file directly
under ~/.config/dot/, one identifier=value line each, split on the
first = only; identifier split on the first two .s into
file.group.key, leaving the key free to contain further dots or spaces).
Implement the KConfigXT schema-backed mechanism: reads and writes go
through kreadconfig6/kwriteconfig6, and the "default" value for a
setting comes from its .kcfg schema. Build the (rcfile → [kcfg files])
mapping table by scanning the system's KConfigXT schema directory for
files that statically declare their target rc file
(<kcfgfile name="...">), plus a small hand-maintained list for the
exceptions that only declare their target file at runtime
(<kcfgfile arg="true"> — kwin.kcfg is a known example). The schema
directory location must be overridable (e.g. via an environment variable),
defaulting to the real system path, so tests can point it at a fixture
directory of synthetic .kcfg files instead.
Structure identifier resolution as a dispatchable decision (rc file is
kglobalshortcutsrc → shortcuts; else resolves via the mapping table →
schema-backed; else → freeform) even though only the schema-backed branch
is implemented yet — later tasks add the other two branches without
restructuring this.
Implement dot kde save for schema-backed settings, in both modes:
run with no arguments, refresh every already-declared manifest entry's
value from the live system; run with an explicit identifier, read its
current live value and add it to the manifest as a new declared entry.
Add dot kde help and dot kde save help, following the project's
check-for-help-before-argparse convention at each dispatch level.
Add README rows for dot kde help, dot kde save <identifier>, and
dot kde save (no arguments).
Acceptance criteria
dot kdeanddot kde saveare discoverable viadot helpand dispatch correctly- Manifest parsing splits correctly on the first
=(values may contain=) and the first two.s of the identifier (keys may contain dots/spaces) - The
(rcfile → [kcfg files])mapping table is derived by scanning a schema directory for<kcfgfile name="...">, plus the hand-maintained exceptions list forarg="true">schemas - The schema directory is overridable via an environment variable, defaulting to the real system path
dot kde save <identifier>reads the current live value viakreadconfig6and adds a new declared entry to the manifestdot kde savewith no arguments refreshes every already-declared manifest entry's stored value from the live system, leaving undeclared settings untoucheddot kde helpanddot kde save helpprint usage without touching the manifest or invokingkreadconfig6/kwriteconfig6- Tests run against a scratch
$HOMEand a fixture.kcfgschema directory, exercising manifest read/write, identifier parsing, and mapping-table-driven default lookup, per the project's scratch-$HOME-plus-fishtapeconvention - README has rows for
dot kde help,dot kde save <identifier>, anddot kde save