Departures for Omarchy
Your next departure, in your bar. A live departure board for any public transport stop in Sweden, with two data sources:
- ResRobot (default) — every operator in Sweden via Trafiklab's national API: SL, Västtrafik, Skånetrafiken, SJ, all of them. Timetable data; realtime coverage varies by operator.
- Västtrafik — full realtime for the Gothenburg region straight from Västtrafik's own API: the same live predictions, delays, and cancellations the To Go app shows.
The bar shows a countdown to your next departure. Click it for the board: line numbers, destinations, scheduled times, live countdowns, and delay minutes in orange when realtime data says you have time for another coffee.
Features
- Next-departure countdown in the bar, with a metro/bus/train/tram/ferry glyph
- Departure board panel: line badges, destinations, times, live countdowns
- Realtime delays shown as
+Nminutes when the source reports them - Cancelled departures filtered out (Västtrafik source)
- Any stop in Sweden — type its name, the widget resolves it via stop lookup
- Configurable number of departures shown
- API-friendly: one board request every two minutes, well inside Trafiklab's free tier (30,000 calls/month); countdowns tick locally in between
- Theme aware — follows your Omarchy theme like the built-in widgets
- Multiple instances allowed: add one widget per stop
Install
omarchy plugin add https://github.com/antoniowav/omarchy-departures.git --enable
Remove
omarchy plugin remove io.github.antoniowav.departures
Setup — bring your own free API key
ResRobot (all of Sweden)
- Create a free account at trafiklab.se
- Create a project and request a ResRobot v2.1 API key (granted instantly)
- Click the widget, open the gear, pick RESROBOT · ALL SWEDEN, paste the key, type your stop, save
Västtrafik (Gothenburg region, full realtime)
- Create a free account at developer.vasttrafik.se
- Create an application, then subscribe it to "Plan Trip v4" (Subscriptions → Subscribe to new API) — without the subscription every request returns 403
- Click the widget, open the gear, pick VÄSTTRAFIK · REALTIME, and paste the app's Client identifier and Secret, type your stop, save
Note: use the Client identifier and Secret fields from the portal — not the long "Authentication key", which is those two pre-encoded and won't work here.
The panel header shows which stop your name resolved to. Settings can also be
set from a terminal (omarchy bar set io.github.antoniowav.departures stop "Odenplan")
or by editing the widget's entry in ~/.config/omarchy/shell.json.
Settings
| Key | Default | Meaning |
|---|---|---|
provider |
resrobot |
Data source: resrobot or vasttrafik |
apiKey |
— | Trafiklab ResRobot v2.1 key (resrobot source) |
vtKey |
— | Västtrafik client identifier (vasttrafik source) |
vtSecret |
— | Västtrafik client secret (vasttrafik source) |
stop |
— | Stop name, resolved via the source's stop lookup |
maxDepartures |
8 |
Departures shown in the panel (1–20) |
refreshMinutes |
2 |
Board refresh in minutes (Västtrafik 1–30, ResRobot 2–30) |
Middle-click the widget to force a refresh.
Dependencies
None beyond what Omarchy ships: curl for fetching, rendered by the Omarchy
Quattro shell. External services: the Trafiklab ResRobot v2.1 API or the
Västtrafik Planera Resa v4 API, each with your own key. No telemetry.
Data
ResRobot source: Trafiklab ResRobot v2.1, all Swedish operators, scheduled times (realtime coverage varies by operator and is absent for e.g. Västtrafik). Västtrafik source: Planera Resa v4 with full realtime for the Gothenburg region.
License
MIT