Documentation

Choosing a background

The deck can show a moving picture or a wallpaper behind its cards. It is one layer for the whole deck: pages slide over it, cards are drawn on it with their own transparency (a translucent theme such as glass lets it show through), and it never takes a swipe or a tap.

A theme can bring a background of its own. A configuration without a background shows the theme’s choice, and "background": { "type": "none" } switches every background off. A theme that chooses nothing, and a background that is off, cost nothing: no surface, no frames.

The background setting

A top-level object in urdeck-config.json. It applies when the file is saved, without a restart.

"background": { "type": "shader", "name": "aurora", "speed": 0.5, "angle": 30 }
"background": { "type": "shader", "name": "plasma", "colors": ["#0f1a4d", "#8c268c", "#fa9e40"] }
"background": { "type": "image", "path": "D:/Pictures/wall.jpg", "dim": 0.4 }
"background": { "type": "shader", "name": "my-thing", "scale": 0.25, "density": 3.0, "glow": "#ff8800" }
"background": { "type": "image", "path": "D:/Pictures/wall.jpg" }
"background": { "type": "none" }
Key For Meaning Default Valid
type all shader, image or none (nothing else is needed for none) required those three
name shader A built-in name, or a folder in backgrounds/ (see writing a background) required letters, digits, -, _
speed shader Multiplies time: 2 is twice as fast, 0 stops it 1 0 to 10
scale shader The resolution it is drawn at, as a fraction of the panel’s 0.5 0.1 to 1
colors shader Replaces the theme’s palette the theme’s 1 to 4 colours
dim shader, image How strongly the scrim darkens the background behind the cards the theme’s own scrim 0 to 0.7
path image The picture required see images
any other key shader A parameter of that shader the shader’s default

A configuration with no background, or with "background": null, leaves the choice to the theme. A value that is wrong (not an object, an unknown type, a missing name or path) is logged and the deck shows what a failed background shows: the theme’s still background if it has one, else its background colour. A speed or scale out of range is logged and the default is used.

The editor’s Theme and background section (left-click the tray icon) chooses all of this without the file: the theme’s choice, none, a picture or any background shown with its sample, Moving or Still (speed 0), the shader’s own options with Reset, and the dimming. A page’s own background is not supported: it is ignored, and urdeck.log says so; set the top-level one.

Theme backgrounds

A theme can choose its background with its background group: a default shader (background.default.name), a still background (background.static: a gradient, a colour, or a picture file inside the theme’s folder, scaled to cover) and a scrim. What the deck shows is the first of these that applies:

  1. the configuration’s background, none included
  2. the theme’s default shader
  3. the theme’s still background
  4. the theme’s background colour

A background that fails (an unknown shader name, SkSL that does not compile, a missing picture) is logged once and the next one in the list is tried, so a theme with a still gradient shows the gradient when its shader cannot run. The theme’s default is only used when the configuration says nothing: choose a shader or an image and that is shown, in the theme’s palette unless you give colors; its still background is only what a failure of yours falls back to. A picture path that leaves the theme’s folder is ignored with a warning, and built-in themes have no pictures.

To switch a theme’s background off, set "background": { "type": "none" }: the deck shows the theme’s background colour and nothing else, no still background and no scrim. Deleting the background key brings the theme’s choice back.

The scrim (background.scrim, a colour and an alpha from 0 to 1) is a veil drawn over the shader, the picture or the still background, whoever chose it, so text keeps its contrast over a bright or busy one. It is not drawn over the plain background colour, and not when the background is none.

dim in the configuration’s background overrides how strong it is: the scrim is then drawn in the theme’s scrim colour (black when the theme has none) with dim as its alpha, from 0 (no veil) to 0.7. A value outside that range is clamped; a value that is not a number is logged and the theme’s own scrim is used. Without dim the theme’s scrim applies. The editor’s Dim behind cards slider writes it.

The theme’s motion.level does not change the background: a moving default moves. The user’s motion level does: when the configuration’s motion is reduced or off, or the configuration has none and Windows’ Animation effects setting is off, a moving shader is drawn still, at its first frame. "motion": "full" brings the motion back.

The log says what was chosen, once per change: Background: shader 'horizon' (built-in) from theme default, surface ... (or configuration, theme still background), and Background: colour (theme colour) when only the colour is left.

The built-in backgrounds

Sixteen ship with UrDeck. Each is a folder with a manifest, which is the source of truth for its settings and their ranges; the list below is made from them. Every one draws with the palette, so it follows the theme (see colours), except spectrum, whose colours are hues. “Palette” says what the four colours mean to that shader, in order. Each names the themes it suits, which an editor uses to recommend a pairing; it never decides what is shown.

The Aurora background.

Aurora aurora

Three glowing curtains swaying along the longer side of the display.

Palette: the palette, in order

Settings (1)
KeyRangeMeaning
intensity0 to 3Brightness of the curtains; 0 is dark, 1 is the designed look.
The Contour background.

Contour contour

Topographic contour lines drifting slowly like a survey map.

Pairs with Blueprint, Carbon, Paper

Palette: ground, ground lit, minor lines, index lines

Settings (3)
KeyRangeMeaning
density4 to 40Number of contour lines.
lineWidth0.3 to 3Thickness of the lines; 1 is the designed look.
relief0.3 to 2How rugged the terrain is.
The Embers background.

Embers embers

Sparks lifting off a glowing horizon and fading as they rise. Dark at the top where widgets live.

Pairs with Ember, Rigline

Palette: night, heat glow, spark, white-hot spark

Settings (2)
KeyRangeMeaning
density0.2 to 2How many sparks.
heat0 to 2Strength of the glow at the bottom.
The Equalizer background.

Equalizer equalizer

Spectrum bars dancing along the bottom edge, with peak caps that fall slowly.

Pairs with Ember, Rigline

Palette: ground, bar bottom, bar middle, bar top

Settings (3)
KeyRangeMeaning
bars4 to 40Number of bars.
gap0 to 0.7Space between bars.
reach0.2 to 0.9How tall the bars can grow, as a fraction of the display.
The Gradient background.

Gradient gradient

A soft gradient whose colour bands drift slowly.

Palette: the palette, in order

Settings (1)
KeyRangeMeaning
angle0 to 360 °Direction of the gradient, in degrees.
The Horizon background.

Horizon horizon

A retro sun setting over a glowing perspective grid that streams toward you.

Pairs with Prism, Rigline

Palette: sky, horizon glow, sun, grid

Settings (3)
KeyRangeMeaning
gridDensity0.4 to 3Number of grid lines; 1 is the designed look.
horizon0.3 to 0.8Height of the horizon line as a fraction of the display, from the top.
sunSize0.4 to 1.8Size of the sun; 1 is the designed look.
The Julia background.

Julia julia

A Julia set whose constant circles slowly. The heaviest built-in; lower the scale if it is too much.

Palette: the palette, in order

Settings (2)
KeyRangeMeaning
radius0.5 to 1Size of the circle the Julia constant travels on; it changes the set's shape.
zoom0.25 to 4How far the set is magnified; 1 shows the whole set.
The Nebula background.

Nebula nebula

Drifting colour clouds with an irregular scatter of twinkling stars, some in loose clusters.

Pairs with Carbon, Obsidian, Prism

Palette: space, then three cloud colours

Settings (4)
KeyRangeMeaning
starClustering0 to 10 spreads the stars evenly, 1 gathers them into clumps.
starDensity0 to 3How many stars.
twinkle0 to 2How much the stars flicker.
zoom0.5 to 2.5Scale of the clouds; larger is closer.
The Plasma background.

Plasma plasma

Slow warped fields of colour, drawn with the theme's palette.

Palette: the palette, in order

Settings (2)
KeyRangeMeaning
angle0 to 360 °Direction the colour fields drift, in degrees.
zoom0.5 to 10How many colour fields fit on the display; higher is busier.
The Plotter background.

Plotter plotter

A drafting grid with a slow scan line and dashed rings that pulse out and vanish.

Pairs with Blueprint, Carbon, Paper

Palette: paper, minor grid, major grid and rings, scan line

Settings (3)
KeyRangeMeaning
cells6 to 40Number of major grid cells across the width.
ringRate0.3 to 2How far the rings grow; 1 is the designed look.
scan0 to 2Brightness of the scan line; 0 hides it.
The Ripple background.

Ripple ripple

Sunlight caustics rippling across a pool floor.

Pairs with Paper, Pop, Prism

Palette: deep water, water, light, highlights

Settings (2)
KeyRangeMeaning
ripples0.4 to 3How many ripples fit across the display; larger is smaller ripples.
sharpness0.3 to 2.5Contrast of the bright lines.
The Shapes background.

Shapes shapes

Flat outlined shapes bobbing and turning slowly. Made for light, bold themes.

Pairs with Paper, Pop

Palette: ground, then three fills

Settings (3)
KeyRangeMeaning
count2 to 12Number of shapes, up to 12.
outline0 to 3Thickness of the outlines; 0 removes them.
outlineColorColour of the outlines.
The Spectrum background.

Spectrum spectrum

Slow shifting rainbow light, the RGB-keyboard look, kept soft so widgets stay readable.

Pairs with Prism, Rigline

Palette: ground; the fourth colour only at saturation 0; the other two unused

Settings (4)
KeyRangeMeaning
hueShift0 to 1Rotates the colours around the wheel.
intensity0 to 2Brightness.
saturation0 to 1.5Colour strength.
vignette0 to 1How strongly the edges darken.
The Streams background.

Streams streams

Fine columns of light flowing downward, like data in a server room.

Pairs with Blueprint, Carbon, Rigline

Palette: background, faint trail, body, bright head

Settings (2)
KeyRangeMeaning
density0.3 to 3Number of streams.
trail0.3 to 3Length of each trail.
The Vortex background.

Vortex vortex

Light rays spiralling into a glowing core in two layers turning in opposite directions.

Pairs with Obsidian, Prism, Rigline

Palette: void, outer rays, inner rays, core

Settings (3)
KeyRangeMeaning
arms3 to 24Number of spiral arms.
core0.3 to 3Size of the glowing core.
twist0 to 3How tightly the arms wind.
The Warp Gate background.

Warp Gate warpgate

Falling through an event horizon at light speed: starlight streaks, pulsing rings of light and a swirling bright core.

Pairs with Carbon, Ember, Obsidian, Rigline

Palette: deep space, tunnel wall, streaks and rings, core

Settings (4)
KeyRangeMeaning
coreSize0.4 to 2.5Size of the glowing core.
ringRate0.3 to 2How far the rings of light reach.
streaks0.2 to 2How many starlight streaks.
swirl0 to 3How tightly the tunnel walls twist.