Skip to content

feat: add disk-monitor plugin - #109

Draft
rael2pac wants to merge 2 commits into
noctalia-dev:mainfrom
rael2pac:add-disk-monitor
Draft

feat: add disk-monitor plugin#109
rael2pac wants to merge 2 commits into
noctalia-dev:mainfrom
rael2pac:add-disk-monitor

Conversation

@rael2pac

Copy link
Copy Markdown

Plugin

  • Id: rael2pac/disk-monitor
  • New plugin

What it does

Bar widget and panel for monitoring disk usage. Shows free space in the bar and detailed panel with capacity bars, SSD/HDD detection, and disk selection.

External dependencies

  • lsblk for disk detection
  • df for filesystem usage

Testing

  • Tested on Niri
  • Tested on Hyprland
  • Tested on Sway
  • Noctalia version tested against: v5 latest
  • Plugin API level: 3

Screenshots / Videos

Checklist

  • Directory name matches the part of id after / in plugin.toml exactly.
  • Ships plugin.toml, README.md, thumbnail.webp, and translations/en.json.
  • README.md follows the README template.
  • Created thumbnail.webp with the thumbnail generator. (TODO)
  • version follows semver; plugin_api is the oldest API level required.
  • Did not edit catalog.toml.
  • This PR touches exactly one plugin directory.

Code review attestation

  • 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 accounted for above.
  • I have the right to publish this code under the license declared in plugin.toml.

rael2pac added 2 commits July 26, 2026 01:29
- Bar widget and panel for monitoring disk usage
- Shows free space, capacity bars, SSD detection
- Uses lsblk and df
@ItsLemmy

Copy link
Copy Markdown
Contributor

• 1. blocking - disk-monitor/plugin.toml:1

The required dependencies field is missing despite spawning lsblk and df.

disk-monitor/service.luau:58
disk-monitor/service.luau:66
disk-monitor/README.md:28

Declare both dependencies and add a Requirements section naming them. This currently fails repository validation.

  1. blocking - disk-monitor/translations/en.json:2

All six settings translations use flattened dotted keys with uppercase characters. Their manifest references are consequently invalid.

disk-monitor/plugin.toml:22
disk-monitor/plugin.toml:29
disk-monitor/plugin.toml:44

Rewrite the catalog using nested objects and lowercase key segments, then update the manifest references. This currently fails repository validation.

  1. non-blocking - disk-monitor/widget.luau:77

Runtime translation keys used by the widget and panel are absent from en.json, and their fallbacks and several direct labels are Portuguese. English
users will see text such as "Sem dados", "livres", and "Monitor de Discos".

disk-monitor/widget.luau:90
disk-monitor/panel.luau:117
disk-monitor/panel.luau:172
disk-monitor/panel.luau:197

Add valid English translations and translate the remaining direct labels.

  1. non-blocking - disk-monitor/README.md:25

The documentation and setting description advertise name_free, percent, and size. The implementation has no size format and instead supports free_only
and name_percent.

disk-monitor/translations/en.json:3
disk-monitor/panel.luau:97
disk-monitor/widget.luau:89

Make the documented and implemented format values consistent.

  1. non-blocking - disk-monitor/panel.luau:80

The panel renders every detected disk but defines selection callbacks only for disks 1 through 8.

disk-monitor/panel.luau:120
disk-monitor/panel.luau:141


By the way we have noctalia.systemStats() which I could improve to return disk data since we already have all the code in the shell...

@ItsLemmy
ItsLemmy marked this pull request as draft July 26, 2026 12:59
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