src/: core engine, text objects, display backends;src/data/os/: platform shims.tests/: Catch2 suites (test-*.cc) and fixtures;data/,extras/,web/: example assets.cmake/: build helpers;3rdparty/: pinned vendored libraries;lua/: scripting hooks used in config samples.- Keep build outputs in
build/; clean when switching toolchains to avoid stale config.
- Setup:
mise installinstalls pinned tools frommise.toml(cmake,ninja,uv,bun,lefthook);mise activaterunsmise i -qon repo enter.mise run doctorchecks native dependencies (miseprovides build tools; install X11, Cairo, Lua, Imlib2, librsvg, ncurses, and libxml2 via the OS package manager). - Tasks:
mise run configure,mise run build,mise run test,mise run format, andmise run check-formatwrap CMake/Ninja.mise run python-depsvalidates Python helpers viauvandrequirements-dev.txt(do not install Python directly). - Website:
mise run web-install,mise run web-dev,mise run web-build, andmise run web-lintmanageweb/. Use Bun for website and JS hook tooling (bunxfor one-off executables). - Configure:
cmake -S . -B build -G Ninja -DMAINTAINER_MODE=ON(debug-friendly, out-of-tree, CI-aligned). - Compile:
cmake --build buildorninja -C build. - Test:
ctest --test-dir build --output-on-failure; filter with./build/tests/test-conky "<test-or-tag>"(e.g.,"[linux]") or./build/tests/test-conky --section "<section>". - Format:
cmake --build build --target clang-formatorninja -C build clang-format; verify withcmake --build build --target check-clang-format. If missing, reconfigure with-DCHECK_CODE_QUALITY=ON. - Coverage:
cmake -S . -B build -G Ninja -DMAINTAINER_MODE=ON -DCODE_COVERAGE=ON, thencmake --build build --target test-conky-coverage-html(outputs HTML totest-conky-coverage-html/, e.g.,build/tests/test-conky-coverage-html/index.html).
- Follow Google C++ style: 2-space indent, 80-column target, left-aligned pointers (
char* ptr), braced initialization. - Order includes: system, third-party, project. Run
clang-formatbefore committing; no manual tabs. - For new components, mirror existing naming patterns such as
display_output_x11,text_object_xyz, and theupdate-cb.hhcallback pattern (callback<Result, Keys...>+register_cb<YourCallback>).
- Add tests in
tests/astest-feature.ccwithsnake_caseCatch2 section tags. - Guard OS- or backend-specific assertions with the implementation's
#ifdefs. - Regenerate coverage after behavioral changes to verify critical modules remain covered.
- Use Conventional Commits (e.g.,
fix: correct .dockerignore,build(deps): bump libfoo) with imperative, present-tense subjects. - Keep commits to one logical change and reference issues/PRs with
(#1234). - In PRs, state intent, list validation commands, and attach screenshots for user-visible output changes.
- Pass
ctest, formatting, and key runtime checks before requesting review; branches must be merge-ready.
- Register text objects via
OBJ,OBJ_ARG,OBJ_IF, andOBJ_IF_ARGinsrc/core.cc(construct_text_object); reuse caching/update helpers instead of ad hoc loops. - Derive backends from
display_output_base; degrade new drawing code gracefully for ncurses and HTTP outputs. - Use
update_cb+conky::callback_handlefor long-running stats to keep the UI responsive.