Skip to content

Add kvitals plugin - #224

Draft
bageraz88 wants to merge 1 commit into
noctalia-dev:mainfrom
bageraz88:add-kvitals
Draft

Add kvitals plugin#224
bageraz88 wants to merge 1 commit into
noctalia-dev:mainfrom
bageraz88:add-kvitals

Conversation

@bageraz88

Copy link
Copy Markdown

Plugin

  • Id: royalebiskut/kvitals
  • New plugin
  • Update to an existing plugin (version bumped in plugin.toml)

What it does

KVitals is a Luau port of the KVitals KDE Plasma widget (GPL-3.0). A headless
service samples the host System Monitor, sysfs, and /proc, then publishes one
merged sample to the plugin state. The bar widget shows compact metric chips:
CPU, RAM, temperature, GPU, VRAM, fan, battery, network, and disk. The panel
shows sparkline graphs and a details grid. The desktop tile shows the same
chips stacked. All metric, threshold, icon, and color settings are plugin-level
under Settings -> Plugins -> KVitals.

External dependencies

  • cat (coreutils) — tiny sysfs reads through a serial async queue. Declared in dependencies.
  • ip (iproute2) — optional local IPv4 refresh, every 30 ticks. Declared in dependencies.
  • The host System Monitor service provides CPU, RAM, GPU, VRAM, load, and disk usage; no extra binary.

Testing

  • validate-plugins.py passes locally: 63 plugin manifests, 0 errors. Unit tests: 56/56 OK.
  • luac -p passes on every entry script and module.
  • Ran live on the author's Noctalia beta.7 (5.0.0.r5032.g73e498510-1):
    bar widget chips render and update every second; the panel opens on
    left-click with graphs and details; the desktop tile renders; settings open.
    VRAM values verified live (amdgpu sysfs through the host System Monitor).
  • Tested on Niri
  • Tested on Hyprland
  • Tested on Sway
  • Tested on another compositor: the author's Wayland compositor (CachyOS)
  • Noctalia version tested against: 5.0.0.r5032.g73e498510-1 (beta.7)
  • Plugin API level: 22

Screenshots / Videos

thumbnail.webp (960x540, from the thumbnail generator) shows the bar widget
and the sparkline panel. Happy to add a live screenshot on request.

Checklist

  • The directory name matches the part of id after the / in plugin.toml exactly.
  • It ships plugin.toml, README.md, thumbnail.webp, and translations/en.json.
  • README.md follows the
    README template, documents
    every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.
  • I created thumbnail.webp with the thumbnail generator.
  • version follows semver and is bumped in this PR; plugin_api is the oldest API level this plugin requires.
  • Every non-English translation in this PR uses a locale supported by Noctalia core, and I can read, write, and
    understand that language well enough to review and maintain it (no unreviewed machine/LLM translations).
  • I did not edit catalog.toml; CI generates it.
  • This PR touches exactly one plugin directory.

Code review attestation

Plugins run as trusted, unsandboxed Luau in the user's session. Confirm:

  • The code is readable and not obfuscated, minified, or generated.
  • It does not download and execute remote code.
  • Every network call, filesystem write, and spawned process is something the description above accounts for.
  • I have the right to publish this code under the license declared in plugin.toml.

@ItsLemmy

ItsLemmy commented Aug 3, 2026

Copy link
Copy Markdown
Contributor
  1. blocking - kvitals/lib/chips.luau:86

The fan builder declares its configuration argument as _c, then dereferences the undeclared global c. Building the default-enabled fan metric raises attempt to index a nil value (global 'c'). This was reproduced directly with a 1200 RPM sample. On systems exposing a fan sensor, this can break rendering in the bar widget, panel, and desktop tile.

  1. non-blocking - kvitals/lib/chips.luau:96

The charging check matches the substring charging, so the status Discharging is classified as charging. A discharging sample reproduced charging = true and selected the battery-charging glyph. Match the complete status instead.

  1. non-blocking - kvitals/lib/chips.luau:127

Disk activity and critical thresholds are documented as percentages in kvitals/README.md:45 and labeled as activity thresholds in kvitals/translations/en.json:33, but the chip compares them against diskTempC. A sample with 10 percent disk usage and 85°C temperature was classified as active with the default 80 percent threshold. Use diskUsage.usagePercent, or rename and document the settings as temperature thresholds.

@ItsLemmy
ItsLemmy marked this pull request as draft August 3, 2026 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants