AirGradient
A Quattro shell plugin that shows live air quality from your AirGradient monitor in the Omarchy bar.
The bar shows a compact pill with PM2.5, CO₂, temperature, and humidity — exposure metrics get a color-coded dot (green → yellow → orange → red → purple). Click it for a details panel with all six metrics (plus PM10 and TVOC); middle-click refreshes; right-click opens your AirGradient dashboard. The panel includes a location dropdown to switch which monitor the widget reports, so you do not need a terminal for day-to-day changes.
Data is polled from the AirGradient cloud API every minute, so it works from any network. The dot and metric colors follow standard exposure bands.
Install
The plugin is a folder under ~/.config/omarchy/plugins/lgw.airgradient/.
Enable it and drop it on the bar:
omarchy plugin enable lgw.airgradient
omarchy bar put lgw.airgradient --section right
Saved edits under ~/.config/omarchy/plugins/ hot-reload automatically. Force
a rediscovery with omarchy-shell shell rescanPlugins if needed.
Configure
-
Open app.airgradient.com and sign in.
-
Go to General Settings → Connectivity and enable API access. Copy the API token it shows you.
-
Open Locations Administration. The location ID is the number in the first column of the table for your monitor.
-
Set the plugin settings either:
- through the Omarchy plugin settings panel (Setup → Plugins), or
- directly:
omarchy bar set lgw.airgradient apiToken <YOUR-API-TOKEN> omarchy bar set lgw.airgradient locationId <YOUR-LOCATION-ID>
Optional settings:
omarchy bar set lgw.airgradient refreshIntervalSec 120 # poll seconds, min 10
The pill is always visible once the widget is on the bar and shows "–" until the first reading arrives. A wrong token or ID shows the API error on the panel instead of silently failing. The location dropdown refreshes the list from the account's bulk endpoint whenever the panel opens, so newly added monitors appear without restarting anything.
Develop / publish
The plugin is a git repository:
cd ~/.config/omarchy/plugins/lgw.airgradient
git log # current state
Push it to GitHub/GitLab, then anyone can install it with:
omarchy plugin add https://github.com/YOUR-NAME/omarchy-airgradient.git --enable
Install from your own checkout with the same commands as any hand-installed plugin. See the Omarchy plugin development guide for the publishing checklist.
Security
The plugin runs unsandboxed inside omarchy-shell, like every Omarchy plugin.
Your API token is stored in ~/.config/omarchy/shell.json (mode 0600) and is
sent to api.airgradient.com only. The token is never logged and never appears
in any process's command-line arguments — curl reads the URL from a pipe, not
from argv, so it is invisible to ps and /proc/PID/cmdline. The token is
still present in the omarchy-shell process's memory while the request is in
flight.
Files
manifest.json— plugin manifest and settings schemaBarWidget.qml— bar pill + panel lifecyclePanel.qml— polling, error handling, and the details panelModel.js— response parsing, formatting, and exposure bandspreview.png— marketplace listing preview