PebbleOS Hacking - Adding a Global Watch Preferences Panel

I've always wanted this feature - what would it take to make it work?
2 min read

Originally Posted on my Twitter Account >

Sometimes, when you just aren’t tired - you get up to late night firmware hacking. That was me, a couple weeks ago. The outputs work pretty well in the emulator - a system app and some new syscalls to process updates and manage the setup of settings when a watchface starts. Turns out, it’s kind of fun to pair program with claude on unknown codebases for fun at 2am!

Dare I install this on a real watch?

Settings Panel

The architecture I came up with was pretty simple - a new syscall / api for within watchfaces, that allows the watchface to advertise the settings keys that it uses for color, along with some strings to display.

This means that it would be opt-in, but also means that it’s relatively minimal since many watchfaces already do similar storage for color preferences:

// Declare watchface settings
const WatchfaceSetting settings[] = {
  {
    .name = "Background Color",
    .persist_key = SETTING_KEY_BG_COLOR,
    .type = WatchfaceSettingType_Color,
    .color = { .default_color = { .argb = GColorBlackARGB8 },
                .palette = WatchfaceSettingColorPalette_Full },
  },
  {
    .name = "Hour Hand Color",
    .persist_key = SETTING_KEY_HAND_COLOR,
    .type = WatchfaceSettingType_Color,
    .color = { .default_color = { .argb = PBL_IF_COLOR_ELSE(GColorRedARGB8, GColorWhiteARGB8) },
                .palette = WatchfaceSettingColorPalette_Full },
  },
};

watchface_settings_declare(settings, ARRAY_LENGTH(settings));

For a black and white watch, it still works - just fewer options. Since shading is done using dithering, text wouldn’t not support the full pallete, but backgrounds would:

setup code and the corresponding system panel

Color Picker

I later improved the color picker to show swatches:

color picker with swatches

Code Changes

This just a hacking project - but I’m open to doing the work to get this into the real version of the OS if it’s wanted! The code claude & i produced, is here:

https://github.com/coredevices/PebbleOS/compare/main…richinfante:PebbleOS:feature/watchface-settings-on-watch

Feedback

Found a typo or technical problem? report an issue!

Subscribe to my Newsletter

Like this post? Subscribe to get notified for future posts like this.