Skip to content

widget: System info (OS / uptime / resources) #9

Closed

Description

@unhappychoice

Intent

Self/home context. The classic neofetch-style "this is my machine" panel. Also useful as a quick sanity panel on a server (load spiking? disk full?).

Fetcher kind + safety

  • `RealtimeFetcher`. CPU load / memory / battery are all "now" values; the whole point of the widget is to not show a stale snapshot. `sysinfo` reads are microseconds, safe for per-frame compute.
  • `Safety::Safe`. Everything comes from `/proc` or the OS-specific equivalents.

Data source

`sysinfo` crate — covers OS name/version, uptime, load avg, CPU count + usage %, memory, swap, disks, batteries, network interfaces. Single crate dep handles every value we'd want in v1.

Payload shape

`Body::Entries` with user-selectable metrics:

key value example
`os` `Ubuntu 22.04 (linux 6.6.87)`
`host` `unhappy-desktop`
`uptime` `3d 2h 14m`
`load` `0.28 / 0.41 / 0.55`
`cpu` `12% (8 cores)`
`memory` `6.2 / 16.0 GB`
`swap` `0.0 / 2.0 GB`
`battery` `84% (discharging)`

Values that need humanization (bytes, durations) are formatted inside the fetcher so the renderer stays dumb.

Config schema sketch

```toml
[[widgets]]
id = "system"
fetcher = "system"

[widgets.system]
show = ["os", "uptime", "load", "cpu", "memory", "battery"] # ordering + filter
units = "si" # "si" | "iec" for bytes
```

Design questions

  • Default metric set: what's useful on every platform? Probably `os`, `uptime`, `load`, `cpu`, `memory`. Battery is laptop-only, skip silently on desktops.
  • Split into finer widgets? Individual `cpu_load`, `memory`, `battery` widgets (in the catalog) overlap heavily with `system`. Options:
    1. `system` is the one-stop widget; the granular ones aren't built.
    2. `system` is just `sysinfo` glue; the granular ones are thin wrappers that pick one metric and often render with gauges.
      First pass: option (1). Promote to (2) only when we need a single-metric gauge badly enough to justify duplication.
  • Cross-platform: `sysinfo` handles it, but verify load avg on Windows (it fakes it) and battery on headless Linux.

Related widgets (see #41)

  • cpu_load, memory, disk, battery, uptime, process_top, sensor_temperatures — all overlap; see design question above
  • system here is the default rollup; finer widgets are deferred unless needed

Out of scope

  • Load graphs / trend over time. `sysinfo` only reads instantaneous values; a trend widget would need its own persistence layer.

Activity

  1. added this to the v1.0 milestone on Apr 21, 2026
  2. unhappychoice commented on Apr 21, 2026

    @unhappychoice
    OwnerAuthor

    Consolidating into catalog #41. Individual widget issues turned out to be premature commitments — priority isn't fixed yet and detailed specs belong alongside the PR that actually ships the widget. Progress tracked as checkboxes in #41 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    widget

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions