2.5 KiB
2.5 KiB
Contributing
Thanks for your interest in contributing to KVitals!
Getting Started
- Fork the repository
- Clone your fork:
git clone https://github.com/<your-username>/kvitals.git cd kvitals - Install locally for development:
bash install.sh
Development Workflow
Making Changes
- Edit files in the project directory
- Reinstall and test:
bash install.sh kquitapp6 plasmashell && kstart plasmashell & - Check for QML errors:
journalctl -b --no-pager | grep kvitals
!!! tip "Fast Iteration" You don't always need to restart plasmashell. For config-only changes, just reopen the settings dialog. For QML changes, a restart is required.
Adding a New Metric
- Sensors — Find the relevant
org.kde.ksysguard.sensorssensor ID usingkstatsviewer - Settings — Add
show*andcompactShow*entries tocontents/config/main.xml - Configuration UI — Add the metric and compact visibility checkboxes to
configMetrics.qml - Icons — Add an icon picker to
configIcons.qml - UI — Add property bindings and model entries in
main.qml
!!! note
Don't forget to add a default icon name for the new metric in configIcons.qml's reset button handler.
Adding a New Setting
- Add the entry to
contents/config/main.xmlwith a default value - Add the UI control to the appropriate config tab (
configGeneral.qml,configMetrics.qml,configIcons.qml, orconfigColors.qml) - Bind the value in
main.qmlviaPlasmoid.configuration.<key>
Pull Requests
- Create a feature branch:
git checkout -b feat/my-feature - Make your changes and test locally
- Ensure ShellCheck passes
- Push and open a PR against
master
!!! tip "Commit Messages" Use conventional commits for clear history:
- `feat:` — New feature
- `fix:` — Bug fix
- `chore:` — Maintenance
- `docs:` — Documentation
Code Style
- QML — Follow KDE's QML conventions, use
Kirigamicomponents where possible - Commits — Use conventional commits:
feat:,fix:,chore:,docs:
Reporting Issues
When filing a bug report, please include:
- KDE Plasma version (
plasmashell --version) - Linux distribution and version
- Whether you're using Intel or AMD CPU
- Relevant journal output (
journalctl -b | grep kvitals)
!!! note "Debugging Output"
To capture detailed logs for a bug report:
bash journalctl -b --no-pager | grep -i "kvitals\|sys-state" > kvitals-debug.log