fix: restore single-label layout, bump to 1.1, update docs

- Revert split RowLayout network section (broke icon rendering without
  Nerd Font); restore original single-label approach while keeping
  Cory's useNerdFont toggle and ic icon table fully intact
- Bump version 1.0 → 1.1
- README: Nerd Font now listed as optional, add panel placement note,
  add useNerdFont to config table, clarify widget is panel/taskbar only
This commit is contained in:
2026-03-29 09:21:52 -04:00
parent 3000011b04
commit 8ecdd8a862
3 changed files with 29 additions and 63 deletions
+5 -2
View File
@@ -1,6 +1,6 @@
# Weather && Stats # Weather && Stats
A KDE Plasma 6 panel widget that displays live weather and system stats in a single compact bar. A KDE Plasma 6 **panel/taskbar widget** that displays live weather and system stats in a single compact bar. Designed to sit in your top or bottom panel — not a desktop widget.
![Plasma 6](https://img.shields.io/badge/Plasma-6.0+-blue) ![License](https://img.shields.io/badge/License-GPL--2.0-green) ![Plasma 6](https://img.shields.io/badge/Plasma-6.0+-blue) ![License](https://img.shields.io/badge/License-GPL--2.0-green)
@@ -20,8 +20,8 @@ All stats update on configurable intervals. Each section can be toggled on or of
## Requirements ## Requirements
- KDE Plasma 6.0+ - KDE Plasma 6.0+
- A [Nerd Font](https://www.nerdfonts.com/) set as your panel font (for icons)
- `bash`, `free`, `/proc/stat`, `/proc/net/dev` (standard on any Linux system) - `bash`, `free`, `/proc/stat`, `/proc/net/dev` (standard on any Linux system)
- A [Nerd Font](https://www.nerdfonts.com/) set as your panel font is **optional** — the widget falls back to plain Unicode symbols if disabled in settings
## Installation ## Installation
@@ -34,6 +34,8 @@ kpackagetool6 --type Plasma/Applet --install weather-and-stats
Then right-click your panel → **Add Widgets** → search for **Weather && Stats**. Then right-click your panel → **Add Widgets** → search for **Weather && Stats**.
> **Placement:** Plasma always adds new widgets at a default position. After adding, right-click your panel → **Enter Edit Mode** and drag the widget to your preferred spot (e.g. left of the system tray). Plasma has no API for widgets to declare a position automatically.
### To update after changes ### To update after changes
```bash ```bash
@@ -54,6 +56,7 @@ Right-click the widget → **Configure Weather && Stats**:
| CPU temp alert threshold | Temp at which the reading turns red | 80°C | | CPU temp alert threshold | Temp at which the reading turns red | 80°C |
| Stats refresh | How often to poll system stats (seconds) | 3 sec | | Stats refresh | How often to poll system stats (seconds) | 3 sec |
| Visible stats | Toggle CPU temp, CPU usage, memory, network | All on | | Visible stats | Toggle CPU temp, CPU usage, memory, network | All on |
| Use Nerd Font icons | Use Nerd Font glyphs; disable for plain Unicode fallback | On |
## How it works ## How it works
+4 -41
View File
@@ -66,12 +66,7 @@ PlasmoidItem {
// ── Panel display ───────────────────────────────────────────────────────── // ── Panel display ─────────────────────────────────────────────────────────
preferredRepresentation: fullRepresentation preferredRepresentation: fullRepresentation
fullRepresentation: RowLayout { fullRepresentation: PlasmaComponents.Label {
Layout.fillHeight: true
spacing: 0
// ── Main label (weather + cpu/mem) ────────────────────────────────────
PlasmaComponents.Label {
Layout.fillHeight: true Layout.fillHeight: true
Layout.preferredWidth: implicitWidth + 16 Layout.preferredWidth: implicitWidth + 16
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
@@ -97,43 +92,11 @@ PlasmoidItem {
cpuMem.push(root.ic.mem + "\u00a0\u00a0" + (root.memUsage >= 0 ? padPct(root.memUsage) : "\u00a0--")) cpuMem.push(root.ic.mem + "\u00a0\u00a0" + (root.memUsage >= 0 ? padPct(root.memUsage) : "\u00a0--"))
if (cpuMem.length > 0) s += div + cpuMem.join(sp) if (cpuMem.length > 0) s += div + cpuMem.join(sp)
if (root.showNetwork) s += div
return s if (root.showNetwork)
} s += div + root.ic.down + "\u00a0\u00a0" + formatNetSpeed(root.netDown) + sp + root.ic.up + "\u00a0\u00a0" + formatNetSpeed(root.netUp)
}
// ── Network ─────────────────────────────────────────────────────────── return s + " "
// A hidden reference label measures the pixel width of the widest
// possible value. Both visible labels are pinned to that exact width
// (min = preferred = max) so content changes never affect their size.
PlasmaComponents.Label {
id: netRef
visible: false
font.family: "monospace"
text: "000 MB/s"
}
PlasmaComponents.Label {
visible: root.showNetwork
font.family: "monospace"
Layout.fillHeight: true
Layout.minimumWidth: netRef.implicitWidth
Layout.preferredWidth: netRef.implicitWidth
Layout.maximumWidth: netRef.implicitWidth
verticalAlignment: Text.AlignVCenter
text: root.ic.down + " " + formatNetSpeed(root.netDown)
}
PlasmaComponents.Label {
visible: root.showNetwork
font.family: "monospace"
Layout.fillHeight: true
Layout.minimumWidth: netRef.implicitWidth
Layout.preferredWidth: netRef.implicitWidth
Layout.maximumWidth: netRef.implicitWidth
verticalAlignment: Text.AlignVCenter
text: " " + root.ic.up + " " + formatNetSpeed(root.netUp) + " "
} }
} }
+1 -1
View File
@@ -4,7 +4,7 @@
"Description": "Live weather and system stats for the KDE panel", "Description": "Live weather and system stats for the KDE panel",
"Icon": "weather-clear", "Icon": "weather-clear",
"Id": "com.github.samjage.weatherstats", "Id": "com.github.samjage.weatherstats",
"Version": "1.0", "Version": "1.1",
"License": "GPL-2.0", "License": "GPL-2.0",
"Category": "System Information", "Category": "System Information",
"Authors": [ "Authors": [