ThemeStore Store Docs FAQ
Documentation

Live data

Feeds, weather and search: where the values come from, what a theme may assume about them, and what happens when they are missing.

On this page

Three sources feed values into a theme without the theme asking for anything: the reader's news feeds, the weather, and their chosen search engine. All three are configured by the reader in the launcher's settings, not by the theme. A theme that shipped its own feed list or its own weather key would be deciding something that is not its to decide.

That has one consequence worth designing around: every value here may be missing, and a theme has to look right when it is.

Feeds#

The reader adds RSS or Atom feeds in the launcher. What reaches a theme are two sets of variables.

As global variables#

VariableWhat it is
rss_countHow many articles are available. 0 when there are no feeds, or nothing has been fetched yet.
rss_1_title …Article title. The number is 1-based, newest first.
rss_N_linkArticle address.
rss_N_summaryShort text.
rss_N_imagePreview picture, or empty when the reader turned pictures off.
rss_N_faviconThe feed's icon, same condition.
rss_N_dateFormatted date.
rss_N_date_msThe same moment as a number, for "2 hours ago" arithmetic.
rss_N_feedDisplay name of the feed.
rss_N_feed_idStable id of the feed, the thing a filter compares against.

Reaching for a fixed number is fine for a single headline card: $rss_1_title$.

As a repeater#

For a list, a repeater with source: "rss" is the way. It maps the numbered variables onto each card, so rss_2_title becomes item_title on the second card, and adds:

VariableWhat it is
item_indexPosition of the card, 1-based.
item_is_new1 for a card that was not there the last time this list was drawn. Useful as the condition for an entrance animation, so only genuinely new items animate.

The list of feeds#

source: "feed_sources" is a second, much shorter list: the feeds themselves, with item_name and item_id. A row of filter chips is that repeater plus a set_variable action per chip and a filterFormula on the article list comparing item_feed_id. No special support, just the ordinary parts. feed_sources_count is available as a global.

What a theme should assume#

Nothing. rss_count is 0 until the reader has added a feed and it has been fetched once, and fetching is deliberately lazy: it happens when a page carrying feed content becomes visible, not on a timer, and it is skipped on a low battery. A feed page that looks broken when empty is a feed page that looks broken to everyone on their first day.

Weather#

The reader picks a provider and how their location is determined. Both choices change what a theme actually receives.

Location modeWhat it is
GPSThe device's position, with permission. Most precise.
ManualA place the reader typed. No permission, no movement.
IPDerived from the network address. Rough, and it changes with the network.

Providers differ in how much they return. Open-Meteo, Bright Sky, MET Norway, OpenWeatherMap and AccuWeather fill the detailed fields: humidity, wind, UV, air quality, the forecast. DMI, Météo-France and Météo-AM return temperature, an emoji and a description and nothing else.

A field a provider does not supply arrives empty rather than as an error. A number comes back as -1 or not-a-number, text as an empty string. So a theme that shows humidity has to survive a reader who chose a provider that has none:

$weather_humidity >= 0 ? format(weather_humidity, '0') + '%' : ''$

The complete list of weather variables is on variables.

default_search_url is the reader's chosen engine as a URL template containing {query}. A search box is an input_field writing into a variable and a button opening that template with the variable substituted.

Searching your apps#

The same field can filter an app list instead. Give the app_grid a filterFormula such as $search_query == '' || contains(lower(app_name), lower(search_query))$ and it narrows as the reader types. Three more pieces make it feel finished:

  • A submit action open_first_app on the field, so enter opens the top match. Add open_url with $search_hits == 0 ? default_search_url : ''$ behind it, and enter searches the web when no app matches. An empty address opens nothing.
  • resultVariable on the grid (here search_hits) for a hint line: search_hits_first holds the name of the app enter would open.
  • clearVariableOnLaunch set to the search variable, so the list is whole again when the reader comes back.

A field at the bottom of the screen has to move out of the keyboard's way. Place it with ime_height, the keyboard's height from the bottom edge: y = $screen_height - max(nav_bar_height, ime_height) - 56$. Only elements whose formulas read ime_height follow the keyboard frame by frame; the rest of the page stays still. The editor's device preview has a keyboard setting to check the layout without typing.

Use the variable rather than writing a provider's address into your theme. The engine is a choice the reader made. Several of the ones offered were chosen precisely because they do not profile the person searching, and a theme that hard-codes a different one quietly overrides that.

Documentation for launcher 0.1.0-alpha Android 12 and later last updated