# Countdown Watchface A clean Pebble watchface with a top progress bar that counts down to your next half-hour mark or upcoming calendar appointment. ## Features - **Time** — large 24-hour format (`HH:MM`) using the Roboto Bold 49 font - **Date** — day/month number (`DD/MM`) in Gothic 28 Bold below the time - **Countdown bar** — 8px bar across the top of the screen: - Starts full at the top of each half hour and drains to empty as it approaches `:00` or `:30` - If a calendar appointment is within the next 30 minutes, the bar counts down to that instead - Requires Google Calendar API setup (see below); falls back to half-hour countdown without it - **Battery bar** — thin 4px indicator along the bottom edge ## Supported platforms `aplite`, `basalt`, `diorite`, `emery`, `flint` ## Building Requires the [Pebble SDK](https://developer.rebble.io/developer.pebble.com/sdk/index.html) (version 3). ```bash cd countdown_watchface pebble build ``` Install on a connected watch or emulator: ```bash pebble install --phone # or pebble install --emulator basalt ``` ## Calendar integration (optional) The watchface uses Google Calendar API to detect appointments within the next 30 minutes. Without this, the bar simply counts down to the next `:00` or `:30`. **Setup:** 1. Create a Google Cloud project and enable the **Google Calendar API**. 2. Generate an **API key** (restrict it to the Calendar API and your IP/app if desired). 3. In the Pebble phone app's JS console (or via a config page), run: ```javascript localStorage.setItem('gcal_api_key', 'YOUR_API_KEY_HERE'); ``` The calendar ID defaults to `primary`. To use a different calendar, edit `src/pkjs/index.js` and change the `CALENDAR_ID` variable. The phone-side JS polls for events every minute and sends the minutes-to-appointment to the watch via AppMessage. If the API call fails or no key is set, the watch falls back to the half-hour countdown automatically.