Notice the battery, and the machine it is or is not in

Panama had no idea whether it was running on a laptop. No upower, no
battery, no lid, no AC: hypridle.conf says "This is a desktop" in its
own header, and that was true of the code as well as the machine.

panama-hw answers hardware questions one at a time, exits 0 or 1, and
prints nothing, so scripts, services and contracts all ask the same
way. The definition the rest of the laptop work hangs on is one line:
clamshell is lid-closed AND an external monitor. A machine with no
mains supply at all reports as being on wall power, because a desktop
cannot run out of it.

The battery service follows Vitals: sysfs through FileView, an
availability flag, and no subprocess on the timer. Globbing is the one
thing QML cannot do -- a battery is BAT0 or BAT1 or CMB0, mains is AC
or ADP1 or ACAD -- so panama-battery resolves the names once and the
shell reads the files directly after. Nothing falls back to a
plausible zero: a desktop shows no indicator, no card, and no charge
limit control where the firmware has no ceiling.

Also repairs two contracts that were already failing and had not been
noticed, because only the full suite runs them. The dependency
scanner treated line-initial variable assignments, case labels,
comments and heredoc bodies as commands, and `count`, `host`, `cancel`
and `import` are all real binaries on Fedora, so `command -v` could
not filter them out. It now drops comments and heredoc bodies and
requires a command to be followed by whitespace. Verified it still
catches a genuinely undeclared dependency rather than passing quietly.
The launcher command contract had not been told about the fourteen
commands added earlier today.
This commit is contained in:
Gabriel Brown
2026-08-21 21:43:14 -04:00
parent e446a1072c
commit 3c359f3f7e
17 changed files with 1032 additions and 9 deletions
+12 -1
View File
@@ -4,7 +4,7 @@
Do not edit this file. Run `quickshell/scripts/panama-settings-docs`
after changing the schema; a contract fails when this copy is stale.
139 settings across 27 groups. 70 of them are applied to the compositor and confirmed by reading the value back.
143 settings across 28 groups. 70 of them are applied to the compositor and confirmed by reading the value back.
## accessibility
@@ -29,6 +29,16 @@ Found on **Appearance**.
| **Appearance**<br>`colorScheme` | dark | Light and dark share one identity, not two themes Choices: Dark, Light. |
| **Accent color**<br>`accentName` | blue | Drives the focused window border, the bar hairline, and every active state Choices: Prism blue, Orchid, Teal, Green, Amber, Orange, Rose, Slate. |
## battery
Found on **Power & Lock**.
| Setting | Default | What it does |
|---|---|---|
| **Warn at**<br>`batteryLowPercent` | 20 % | Mention the battery once it drops this low. Range 550. |
| **Urgent at**<br>`batteryCriticalPercent` | 5 % | Interrupt at this level, even during Do Not Disturb. Range 125. |
| **Stop charging at**<br>`batteryChargeLimit` | 100 % | Charging to less than full is easier on the battery over years. Range 50100. |
## capture
Found on **Screen Intelligence**.
@@ -296,6 +306,7 @@ Found on **Appearance**.
| **Processor**<br>`showCpu` | true | Show processor usage beside the workspace indicator |
| **Memory**<br>`showMemory` | true | Show memory usage beside the workspace indicator |
| **Graphics**<br>`showGpu` | true | Show graphics usage beside the workspace indicator |
| **Battery**<br>`showBattery` | true | Show the charge level in the bar, on machines that have a battery |
| **Vitals refresh**<br>`vitalsIntervalMs` | 2000 ms | How often processor, memory, and graphics usage update. Range 50010000. |
## wallpaper