DEV Community

AlexDesign420
AlexDesign420

Posted on

I built a live FIFA World Cup 2026 desktop widget for macOS

I just open-sourced a macOS desktop widget for the FIFA World Cup 2026. Here's what it does and how it's built.

What it does

  • πŸ”΄ Live scores β€” updated every 3 seconds via the ESPN public API (no API key needed)
  • πŸ“… Full schedule β€” all 104 games grouped by day, with venues and round labels
  • πŸ“» 20+ radio streams β€” ARD, ZDF, BBC, NPR and more, played via mpv
  • πŸ—£ German TTS commentary β€” macOS say announces goals, kick-offs and final whistles
  • πŸ“Š Play-by-play β€” ESPN event feed with goal / card / substitution highlights
  • πŸ“Ί Live ticker panel β€” slide-out side panel with real-time scores for all live games
  • ⏳ Countdown β€” days Β· hours Β· minutes until the tournament kicks off (June 11, 2026)
  • πŸ–₯ Responsive β€” adapts width for 1440p Β· 1080p Β· 2560p Β· 4K displays

Architecture

The widget has three parts:

1. wm2026.jsx β€” An Übersicht widget (JSX/React-like syntax). Runs a shell command every 3 seconds to fetch ESPN data and writes it to ~/.wm2026/.

2. wm2026_server.py β€” A Flask backend on 127.0.0.1:9876. Manages mpv audio playback via Unix socket, caches ESPN API responses, and scrapes live commentary from kicker.de.

3. engine.py β€” Runs every 3 seconds via the widget shell command. Detects goal events by diffing the score state, triggers macOS TTS (say -v Anna) and afplay sound effects.

wm2026.jsx  (shell every 3s)
  └─ curl ESPN API  β†’  today.json / schedule.json
  └─ python3 engine.py  β†’  feed.json, state.json
  └─ fetch()  β†’  Flask server (port 9876)
       β”œβ”€ /api/status      mpv state
       β”œβ”€ /api/play        start stream
       β”œβ”€ /api/ticker      live scoreboard
       └─ /api/commentary  play-by-play events
Enter fullscreen mode Exit fullscreen mode

Tech stack

  • Übersicht β€” macOS widget host
  • Python 3 + Flask β€” local backend
  • ESPN public API β€” scores & schedule (no key required)
  • mpv β€” HLS audio playback via Unix socket
  • macOS say β€” text-to-speech for goal announcements
  • BeautifulSoup β€” kicker.de live ticker scraping

Quick start

git clone https://github.com/AlexDesign420/wm2026-widget.git
cd wm2026-widget
./install.sh
Enter fullscreen mode Exit fullscreen mode

Requires: macOS 12+, Übersicht, Python 3.9+, brew install mpv

GitHub

πŸ‘‰ AlexDesign420/wm2026-widget

Would love feedback β€” especially on the HLS stream resolution workaround for ARD/ZDF backup renditions.

Top comments (0)