Coding a screen
Most screens are made in the visual editor. A coded screen is written in TypeScript instead: the code makes the widgets and changes them as time passes. That makes things possible a fixed layout can't do: a clock with seconds, a countdown, text that changes colour on a schedule, widgets that move.
Getting started
- Open Account settings (the gear at the bottom of the left rail) and turn on Developer options. It applies to all your cubes; turning it off only hides the buttons, coded screens keep working.
- In a group, click Code a screen (under Add screen) and pick a template: Clock or Countdown.
- The screen opens like any other: the display in the middle, its settings on the right. Change a setting and the display follows.
- To see or change the code, click Code above the display. The code editor takes the screen list's place, with the console under it; ← Screens brings the list back.
- The display runs your code as you type. Save (or Ctrl+S) keeps it; the card picture is the screen as it looks at that moment.
The editor checks your code as you type (red underlines), completes names, and shows the docs of everything in xonada when you hover it. Errors while the code runs appear in the console with a Line link, and on the Code button while the code is closed. The console starts over each time the code changes, so a fixed error goes away; drag its top edge to make it taller. Prettify tidies the code's layout (also Shift+Alt+F), and Expand opens it in a large window.
On cube (above the display) runs the code on your cube right away, saved or not, without publishing it: each change reaches the cube within a second or two. Turn it off (or close the editor, or leave it 10 minutes without a change) and the cube goes back to its screens. While the editor is open, the console also shows the cube's output and errors, tagged Cube.
Walkthrough
We'll build a small screen: a greeting, the time, and a bar that fills up every minute.
1. The smallest screen
A screen's code is a module that imports from xonada and ends with export default app({ … }). When the screen comes on, onShow runs and makes the widgets. preload lists the fonts the text uses: the cube gets them before your code runs (see Preload).
import { app } from "xonada";
export default app({
preload: { fonts: [{ fontSize: 48 }] },
onShow({ ui }) {
ui.background("#101828");
ui.text({ x: 0, y: 200, w: 480, fontSize: 48, align: "center", content: "Hello" });
},
});Positions and sizes are display pixels: the display is 480 × 480, x: 0, y: 0 is the top-left corner.
2. Change it over time
Return the widgets you want to change later from onShow. They come back as w in onTick, which runs right after onShow and then every second. Set a property and the display updates; only what changed is redrawn. The time is bold 64, so that font joins preload.
import { app } from "xonada";
export default app({
preload: { fonts: [{ fontSize: 48 }, { fontSize: 64, bold: true }] },
onShow({ ui }) {
ui.background("#101828");
return {
greeting: ui.text({ x: 0, y: 140, w: 480, fontSize: 48, align: "center", content: "Hello" }),
time: ui.text({ x: 0, y: 210, w: 480, fontSize: 64, bold: true, align: "center" }),
};
},
onTick({ w, now }) {
w.time.content = now.format("HH:mm:ss");
},
});3. Add settings
Settings become a form next to the display, so the same code can say different things on different screens. Declare them with setting.…(); the handlers get the values as settings.
import { app, setting } from "xonada";
export default app({
settings: {
name: setting.text("World", { label: "Who to greet" }),
accent: setting.color("#f59e0b"),
timeZone: setting.timeZone(),
},
preload: { fonts: [{ fontSize: 48 }, { fontSize: 64, bold: true }] },
onShow({ ui, settings }) {
ui.background("#101828");
return {
greeting: ui.text({ x: 0, y: 140, w: 480, fontSize: 48, align: "center", content: `Hello, ${settings.name}` }),
time: ui.text({ x: 0, y: 210, w: 480, fontSize: 64, bold: true, align: "center", color: settings.accent }),
};
},
onTick({ w, now }) {
w.time.content = now.format("HH:mm:ss"); // in the time zone setting (empty: the cube's)
},
});4. Shapes and a progress bar
Besides text there are rectangles, circles, lines, progress bars, emoji, and images and GIFs from your Media; shapes and images can have a border (borderWidth, borderColor) and rectangles and images rounded corners (radius). Here a rounded card sits behind the text (lower z is drawn first) and a bar fills up over each minute. The greeting is smaller now (40), so preload changes with it.
preload: { fonts: [{ fontSize: 40 }, { fontSize: 64, bold: true }] },
onShow({ ui, settings }) {
ui.background("#101828");
ui.rect({ x: 40, y: 110, w: 400, h: 260, radius: 16, fill: "#1d2939", z: -1 });
return {
greeting: ui.text({ x: 40, y: 140, w: 400, fontSize: 40, align: "center", content: `Hello, ${settings.name}` }),
time: ui.text({ x: 40, y: 200, w: 400, fontSize: 64, bold: true, align: "center", color: settings.accent }),
minute: ui.progress({ x: 80, y: 310, w: 320, h: 8, radius: 4, color: settings.accent, track: "#344054" }),
};
},
onTick({ w, now }) {
w.time.content = now.format("HH:mm:ss");
w.minute.value = now.second / 59;
},5. How long it shows
A screen shows for its duration (under its name), then the next screen in the group comes on. If your screen needs a minimum time, say so with minDuration (milliseconds): the duration can then be set longer, never shorter. tickEvery changes how often onTick runs: slower if every second is more than you need, or up to 5 times a second for motion.
export default app({
minDuration: 10_000, // at least 10 s on screen
tickEvery: 5_000, // onTick every 5 s
onShow({ ui }) { /* … */ },
onTick({ w, now }) { /* … */ },
});The templates (Clock and Countdown) are complete examples of all of this; open their code to see them.
Reference
Everything comes from the xonada module; it's the only import a screen can use. TypeScript types are checked in the editor and removed when the code runs.
app()
import { app, setting } from "xonada";
export default app({
settings: { /* … */ }, // the settings form (optional)
data: { /* … */ }, // values from your data sources (optional)
minDuration: 5000, // ms (optional)
tickEvery: 1000, // ms, at least 50 (optional, default 1000)
preload: { fonts: [/* … */], images: [/* … */] }, // what the cube needs before the code runs
onShow(context) { return { /* widgets you'll change */ }; },
onTick(context) { /* optional */ },
onData(context) { /* optional */ },
});| Field | What it does |
|---|---|
| onShow(context) | Required. Runs each time the screen comes on, on an empty black display: make the widgets here. Whatever it returns is handed to onTick as w. May be async. |
| onTick(context) | Optional. Runs right after onShow, then every tickEvery ms while the screen shows, on the clock (at :00, :01, … for 1000; :00.0, :00.2, … for 200). |
| onData(context) | Optional. Runs when a value in data changes while the screen shows (onShow already has the values it comes on with). |
| settings | Optional. An object of setting.…() values: the form next to the display (see Settings). |
| data | Optional. Values from your data sources, by the name the code reads them under (see Data). |
| minDuration | Optional. The shortest time in ms the screen may show; its duration can be set longer, never shorter. |
| tickEvery | Optional. How often onTick runs, in ms: 1000 by default, at least 50 (20 times a second). For smooth motion, work out where things are from the time, not a step per tick: w.hand.rotation = (now.timestamp / 1000) * 90 % 360 turns 90° a second whether the cube ran every tick or skipped some. A screen ticking faster than every 200 ms can't show a GIF. |
| preload | Every font, image, emoji and GIF the screen uses (see Preload). Needed as soon as the screen shows any of them. |
Preload
The cube can't make fonts or resize pictures itself: the website makes them when you publish, and the cube downloads them with the screen. preload tells it which ones. Text in a font, or an image, emoji or GIF at a size, that isn't listed is an error, in the preview just as on the cube, so you find out while you write the code.
preload: {
fonts: [{ fontSize: 32 }, { fontSize: 96, bold: true }],
images: [{ assetId: "k3j2h1g0f9e8", w: 80, h: 80 }],
emojis: [{ emoji: "🌤", w: 96, h: 96 }],
gifs: [{ assetId: "p8d2k1m0x7c4", w: 120, h: 120 }],
pictures: [{ data: "photo", w: 300, h: 300 }],
},| List | Each entry | Notes |
|---|---|---|
| fonts | { fontSize, bold? } | One per size and weight any text uses, at any time. A text widget made without fontSize is 32 regular. |
| images | { assetId, w, h, fit? } | An image from your Media at the exact size (and fit, when not "fill") its widget shows it. Showing it at another size or fit means listing that too. |
| emojis | { emoji, w, h } | An emoji ("🌤" or its Twemoji id "1f324") at the exact size its widget shows it. |
| gifs | { assetId, w, h, loop? } | A GIF from your Media at the exact size, and loop ("forever", the default, or "gif"), its widget plays it. When a screen lists more than one, each is made smaller (fewer frames, lower quality if it must) in proportion to its size, so the screen's GIFs together fit what the cube holds for one full-screen GIF. |
| pictures | { data, w, h, fit? } | A picture from data (a value in data holding a picture's URL) at the exact size its image shows it. At most two per screen; each sets aside room on the cube in the storage bar. |
The error says what to add: Text at fontSize 48 isn't preloaded: add { fontSize: 48 } to preload.fonts. Changing size and weight (or an image and its size) one property at a time passes through a combination that may not be listed; change them together with w.time.set({ fontSize: 96, bold: true }). Fonts are shared: a size your other screens use costs nothing extra on the cube.
Data
A screen can show values from your data sources, the same ones text widgets show. List them in data, each under the name the code reads it by: the source's id and the field. With developer options on, the Pick fields step's Output (open it on the data source's page) has a copy button on each value that copies its entry.
data: {
price: { source: "7mn0niplh1x9", field: "bitcoin.eur" },
song: { source: "p2k8d0qa7zr1", field: "results[0].trackName" },
},
preload: { fonts: [{ fontSize: 48 }] },
onShow({ ui, data }) {
return { price: ui.text({ y: 200, w: 480, align: "center", fontSize: 48, content: data.price ?? "…" }) };
},
onData({ w, data }) {
w.price.content = data.price === null ? "…" : `${Math.round(Number(data.price))} €`;
},fieldis a field's name in Pick fields, then a path into it when it holds an object or a list ("results[0].trackName").- Values are text, as a text widget shows them:
Number(data.price)for maths. A value isnulluntil the cube has its first answer, or when the field is empty or holds a list or an object rather than one value. - The cube fetches them with its other data, on each source's cache time, so they're there when the screen comes on.
onDataruns when one changes while it shows. - A source that isn't yours, or a field it doesn't have, is
nullin the preview (the console says why) and blocks publishing. At most 20 values per screen.
A value that holds a picture's URL (album art, a weather icon, a photo) can be shown by an image: name it in picture, and list its size in preload.pictures. The website fetches each new picture and converts it at that size; the cube downloads it while other screens show, so it's there when the screen comes round. Still pictures only (PNG, JPEG, WebP): a GIF doesn't count, and the last good picture stays.
data: {
photo: { source: "h83m2hlfxfro", field: "photo" },
breed: { source: "h83m2hlfxfro", field: "breed" },
},
preload: { fonts: [{ fontSize: 40, bold: true }], pictures: [{ data: "photo", w: 300, h: 300 }] },
onShow({ ui, data }) {
ui.image({ x: 90, y: 40, w: 300, h: 300, radius: 24, picture: "photo" });
return { breed: ui.text({ y: 360, w: 480, align: "center", fontSize: 40, bold: true, content: data.breed ?? "" }) };
},
onData({ w, data }) {
w.breed.content = data.breed ?? ""; // the picture changes by itself
},| Name | What it is |
|---|---|
| preload.pictures | { data, w, h, fit? }: a value in data and the exact size (and fit) an image shows it at. At most two per screen; each takes room in the storage bar. |
| picture | On an image: the name of a value in data ("photo", not data.photo). The image shows that value's picture and changes when it does. |
| assetId | On an image with picture: the placeholder shown until the first picture arrives. Optional. |
Handler context
Every handler gets one object; take what you need from it.
| Name | What it is |
|---|---|
| ui | Makes widgets and sets the background (see ui). |
| w | (onTick and onData) What onShow returned, usually your widgets. |
| settings | The settings form's values, by key, typed from their declarations. |
| data | The current values of what data lists, by name: text, or null (see Data). |
| now | The current time in the app's time zone (see Time). |
| state | An object of your own that survives while the screen is away (its group rotates), e.g. a counter. Cleared when the cube restarts, when the code changes, and by Restart in the editor. |
ui
| Call | What it does |
|---|---|
| ui.text(props) | Makes a text widget. |
| ui.image(props) | Shows an image from your Media library. |
| ui.emoji(props) | Shows one emoji (Twemoji), fitted inside the box and centred. |
| ui.gif(props) | Plays an animated GIF from your Media library, stretched to the box. One per screen. |
| ui.rect(props) | Makes a rectangle: filled, outlined (a border), or both; optionally rounded. |
| ui.circle(props) | Makes an ellipse filling its box (a circle when w and h are the same): filled, outlined (a border), or both. |
| ui.line(props) | Makes a straight line across the middle of its box, from its left edge to its right (turn it with rotation). |
| ui.progress(props) | Makes a progress bar, filling from the left (turn it with rotation). |
| ui.background(color) | The screen's background colour, "#rrggbb". Black when the screen comes on. |
| ui.clear() | Removes every widget. |
Widgets can be made, changed and removed in any handler, not just onShow. A screen can show at most 64 widgets at once.
Widgets
Every widget has these properties. Pass them when making it, or set them later (w.time.y = 100). Several at once: w.time.set({ x: 10, color: "#ff0000" }). w.time.remove() takes it off the screen.
| Property | Default | Notes |
|---|---|---|
| x | 0 | Left edge in display pixels. Can be off the display (it's clipped). |
| y | 0 | Top edge in display pixels. Can be off the display (it's clipped). |
| w | 480 | Width in pixels, 1–480. |
| h | 480 | Height in pixels, 1–480. A text widget is one line of its font tall unless you give h; a progress bar is 8, a line 4. |
| rotation | 0 | Degrees clockwise around the box's centre. |
| z | 0 | Paint order, 0 or more: higher is drawn on top; with the same z, the widget made later is on top. |
| opacity | 1 | How solid it is: 1 is fully solid, 0.5 half see-through, 0 invisible (values outside are kept inside). |
| visible | true | false hides it: it keeps its place and properties but isn't drawn (in the editor it shows faintly). |
Names match the visual editor's, and anything you can set there you can set from code. A property a widget doesn't have is an error (text widgets have no "contnet"), and so is a value it can't use: a colour that isn't "#rrggbb" (or "#rgb"), an align that isn't one of its options, a size outside 1–480.
Text
| Property | Default | Notes |
|---|---|---|
| content | "" | The text. Numbers are turned into text. Up to 1024 characters; \n starts a new line. |
| color | "#ffffff" | Text colour. |
| fontSize | 32 | 20, 24, 32, 40, 48, 64 or 96: the sizes the cube has. Anything else is an error, and so is a size and weight not in preload.fonts. |
| bold | false | Bold weight. Each size and weight a screen uses must be in preload.fonts. |
| align | "left" | "left", "center" or "right". |
| valign | "top" | "top", "middle" or "bottom": where the lines sit in the box. |
| wrap | true | false: one line, cut off with “…”. |
Image
| Property | Default | Notes |
|---|---|---|
| assetId | null | The id of an image in your Media library. Stretched to the widget's box, which must be in preload.images. |
| fit | "fill" | "fill" stretches the picture to the box, "cover" crops it to fill the box, "contain" fits all of it inside the box. |
| picture | null | A picture from data: the name of a value in `data` holding a picture's URL, shown at a size in preload.pictures. assetId is then the placeholder, shown until the first picture arrives. |
| borderWidth | 0 | Border thickness in pixels, inside the box; 0 is none. |
| borderColor | "#ffffff" | Border colour. |
| radius | 0 | Corner radius in pixels (at most half the shorter side); half the height gives round ends. |
With developer options on, each image in Media has a Copy id button (on hover).
preload: { images: [{ assetId: "k3j2h1g0f9e8", w: 80, h: 80 }] },
onShow({ ui }) {
ui.image({ x: 200, y: 40, w: 80, h: 80, assetId: "k3j2h1g0f9e8" });
},An image can also show a picture from data: picture names a value in data that holds a picture's URL (see Data). An assetId beside it is the placeholder, shown until the first picture arrives.
Emoji
| Property | Default | Notes |
|---|---|---|
| emoji | null | The emoji ("🌤"), or its Twemoji id ("1f324"); null shows nothing. At its box size it must be in preload.emojis. |
Any emoji, drawn with Twemoji (the same pictures as the editor's emoji widget). Write the emoji itself or its Twemoji id; the widget keeps the id. Like an image, it's made for the cube at its box size, so that size goes in preload.emojis. It keeps its shape, centred in the box.
preload: { emojis: [{ emoji: "🌤", w: 96, h: 96 }, { emoji: "🌧", w: 96, h: 96 }] },
onShow({ ui }) {
return { sky: ui.emoji({ x: 192, y: 60, w: 96, h: 96, emoji: "🌤" }) };
},
onTick({ w, now }) {
w.sky.emoji = now.hour < 12 ? "🌤" : "🌧";
},GIF
| Property | Default | Notes |
|---|---|---|
| assetId | null | The id of a GIF in your Media library. At its box size and loop it must be in preload.gifs. |
| loop | "forever" | "forever", or "gif": as many times as the GIF itself says, then it stays on its last frame. |
A GIF from your Media, played on the cube at up to 25 frames a second. Like the editor's GIF widget it can't turn or be see-through (it can be hidden). A screen shows one GIF at a time, at most as big as the display (480 × 480 px). Each size and loop goes in preload.gifs. Changing a GIF's box or picture starts it again from its first frame; other widgets changing around it don't.
preload: { gifs: [{ assetId: "p8d2k1m0x7c4", w: 120, h: 120 }] },
onShow({ ui }) {
ui.gif({ x: 180, y: 180, w: 120, h: 120, assetId: "p8d2k1m0x7c4" });
},Rectangle
| Property | Default | Notes |
|---|---|---|
| fill | "#ffffff" | Fill colour, or null for none (an outline, with a border). |
| borderWidth | 0 | Border thickness in pixels, inside the box; 0 is none. |
| borderColor | "#ffffff" | Border colour. |
| radius | 0 | Corner radius in pixels (at most half the shorter side); half the height gives round ends. |
Circle
| Property | Default | Notes |
|---|---|---|
| fill | "#ffffff" | Fill colour, or null for none (an outline, with a border). |
| borderWidth | 0 | Border thickness in pixels, inside the box; 0 is none. |
| borderColor | "#ffffff" | Border colour. |
Line
| Property | Default | Notes |
|---|---|---|
| color | "#ffffff" | Line colour. |
| thickness | 4 | How thick it is, in pixels (its ends are square). |
Progress
| Property | Default | Notes |
|---|---|---|
| value | 0 | How full, 0–1 (values outside are kept inside). The editor shows it as 0–100 %. |
| color | "#ffffff" | The filled part. |
| track | "#333333" | The empty part. |
| radius | 0 | Corner radius in pixels (at most half the shorter side); half the height gives round ends. |
Settings
Each setting is a field in the form next to the display; its key is how the code reads it. The label comes from the key (timeZone → “Time zone”) unless you give one. Every setting takes { label, description } as its last argument.
| Declare | Form field | settings.key is |
|---|---|---|
| setting.text("Berlin", { placeholder }) | Text | string |
| setting.number(10, { min, max, step }) | Number (min/max/step limit the field) | number |
| setting.toggle(true) | Switch | boolean |
| setting.color("#ffffff") | Colour | "#rrggbb" |
| setting.choice(["a", "b"], "a") | Dropdown. Options can be { value, label }. | one of the values (typed) |
| setting.timeZone() | Time zone search; empty = the cube's zone | an IANA zone, e.g. "Europe/Berlin" |
| setting.dateTime("2027-01-01T00:00") | Date and time, in the app's time zone | a timestamp in ms (compare with now.timestamp), or null when empty |
settings: {
title: setting.text("New Year", { label: "Counting down to" }),
target: setting.dateTime("2027-01-01T00:00"),
hours: setting.choice([{ value: "24", label: "24 hour" }, { value: "12", label: "12 hour" }], "24"),
},
onTick({ w, now, settings }) {
if (settings.target === null) return;
const secondsLeft = Math.max(0, Math.ceil((settings.target - now.timestamp) / 1000));
// …
},Values are saved per screen, so one piece of code can run on several screens with different settings. A saved value the code can't use any more (a removed choice, a wrong type) falls back to the setting's default.
Time
now is the current time in the app's time zone: the first setting.timeZone() if the screen has one (and it's set), otherwise the cube's zone (in its Settings). now.in("Asia/Tokyo") gives the same moment elsewhere, for world clocks: any IANA zone works, the cube gets the rules of every zone when you publish.
| Field | Example | Notes |
|---|---|---|
| timestamp | 1792040249160 | Milliseconds since 1970 (UTC). |
| year, month, day | 2026, 10, 15 | month is 1–12. |
| hour, minute, second | 9, 8, 7 | hour is 0–23. |
| millisecond | 160 | |
| weekday | 4 | 0 = Sunday … 6 = Saturday. |
| offset | 120 | Minutes ahead of UTC. |
| zone | "Europe/Berlin" | |
| format(pattern) | "09:08:07" | See the tokens below. |
| in(zone) | The same moment in another zone. |
| Token | Gives | Example |
|---|---|---|
| YYYY / YY | Year | 2026 / 26 |
| MMMM / MMM | Month name | October / Oct |
| MM / M | Month number | 10 / 10 |
| DD / D | Day of the month | 05 / 5 |
| dddd / ddd | Weekday | Thursday / Thu |
| HH / H | Hour, 24-hour | 09 / 9 |
| hh / h | Hour, 12-hour | 09 / 9 |
| A / a | AM or PM | AM / am |
| mm / m | Minutes | 08 / 8 |
| ss / s | Seconds | 07 / 7 |
| SSS | Milliseconds | 160 |
| Z | UTC offset | +02:00 |
| [text] | Text as is | [at] HH:mm → "at 09:08" |
Names are in English. Use now rather than Date: the cube has no time zone database of its own, and now is what it gives the code.
Console
console.log, info, warn and error write to the console under the code. Objects are shown as JSON, widgets as [text widget]. Up to 200 lines per call are kept; long lines are cut at 2000 characters.
console.log("tick", now.second, settings);How it runs on the cube
What runs where
Your code runs on the cube itself, in a small JavaScript engine, with the same xonada module as the editor's preview. The website only stores it, shows the settings form and, when you publish, prepares what the cube needs: the code itself, the fonts and images in preload, and the time zone rules. The code doesn't need the website to keep running (only the values in data come from it, like text widgets'); nothing leaves the cube.
A screen's life
- The group rotates to your screen: the display is cleared to black and
onShowmakes the widgets. The first time, the cube starts the screen's engine (about 0.2 s); it keeps up to four, so screens that come round again start at once. onTickruns at once, then everytickEveryms on the clock. After each call only the widgets that changed are redrawn.- When its duration is up, the next screen comes on. Only the showing screen's code runs; your
stateis kept for the next time it shows. - When the cube restarts, or you publish new code, everything starts fresh.
Limits
The cube is a small computer, so every screen gets the same budget:
| Limit | Value | What happens past it |
|---|---|---|
| Time per call | 50 ms (250 ms for the first show) | The handler is stopped (an error). A countdown's tick takes about 12 ms on the cube. |
| Memory | 512 KB | Making more objects fails with an error. |
| Ticks | at most 20 per second | tickEvery below 50 counts as 50. When ticks take longer than tickEvery, the cube skips ticks rather than running late (it keeps a short pause after each, for the rest of its work), and Run on cube's console says how many it keeps up with. Faster than every 200 ms, a screen can't show a GIF. |
| Widgets | 64 at once | Making another is an error. |
| Text | 1024 characters per widget | The rest is cut off. |
| Code | 32,000 characters | The screen can't be saved. |
Loops that never end are stopped at the limit instead of freezing the cube. Keep heavy work out of onTick: work it out once in onShow and keep it in state.
When the code fails
- A handler that throws changes nothing: the widgets it touched are put back, so the screen stays as it was. (After an
awaitthat's no longer possible; changes made before the error stay.) - The error is reported with its line: in the editor's console (tagged Cube), and as a red mark on the screen's card until the screen shows once without an error, or you save or publish new code.
- After three errors in a row the screen's code stops until the screen comes round again; a call that works resets the count.
- A screen whose
onShowfails on the cube is skipped: the next screen comes on. - Publishing shows each coded screen once, the way the cube will. Code that doesn't load (a syntax error), or whose
onShowfails, can be saved as a draft but blocks publishing: its card gets a red mark that opens the code at the line.
Text, colours and images
- The cube draws text itself with Inter in seven sizes (20–96), regular and bold. Characters it doesn't have show as
?(the preview shows the same). It has Western European letters (Latin-1: é, ü, ß, ñ…), digits, punctuation, ° ± × ÷, curly quotes, dashes, •, …, €, ™ and arrows; not other alphabets or emoji. - Colours are
#rrggbb, without transparency. The display shows 65,536 colours, so very close shades can look the same. Text is drawn over whatever is under it; shapes, bars and images cover it (a shape withfill: nullonly draws its border). - Images come from your Media library, resized to the sizes in
preloadbefore they're sent; emoji too. Pictures from data are converted by the website as they change, at their size inpreload.pictures. - GIFs play on their own while the code runs: a tick that changes other widgets redraws around them without stopping them. Where a widget sits over a GIF, the GIF plays underneath it. Two GIFs overlapping: the upper one covers the lower one there.
What's not there
The engine is plain JavaScript (ES2023) without a browser around it: no fetch, setTimeout, document or Intl, and no imports besides xonada. Time comes from now, repetition from onTick.
Coming next
fetch()for web APIs (through the website, with your API keys kept there).- Animations (fade, slide, count up).