aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-19 14:16:16 +0200
committeruser <user@clank>2026-08-19 14:16:16 +0200
commit4b0c912f6ece642b80014014687a4afa1b8f39e1 (patch)
treeb4a22aa7ba997470ba4e80f6b97b1128357d4f58 /include
parentslosh: greet an attach with the logo, wearing a random shader (diff)
downloadslosh-4b0c912f6ece642b80014014687a4afa1b8f39e1.tar.gz
slosh-4b0c912f6ece642b80014014687a4afa1b8f39e1.tar.xz
slosh-4b0c912f6ece642b80014014687a4afa1b8f39e1.zip
slosh: the splash learns colour
One tint is one colour, and every effect wore the theme accent -- six effects that were all the same dull blue. An effect is a *chain* now: phase-shifted tints in loud literal colours, mixing per cell, which is how a fixed-colour pass machinery does rainbows. Passes may light the backdrop's background too, so the box is a scene rather than tinted text, and the logo is drawn white -- the canvas that takes every hue at full saturation, where tinting blue towards pink lands on mud. The six: spectrum (rainbow bands), plasma (two interference patterns in clashing hues), fire (heat up the glyphs, embers in the box), rings (rainbow ripples), glitch (a reveal under two colours of static), aurora (green and violet curtains over cyan). The splash is deliberately the one place that does not defer to the theme: it is branding wearing a demo, not chrome. {"cmd":"splash","fx":N} picks an effect by index -- a test needs a deterministic one, and "show me the aurora again" deserved an answer. The new test counts dominant-channel hue families on the logo rows, because two hundred shades of the same blue is exactly the failure it guards against.
Diffstat (limited to 'include')
-rw-r--r--include/app.h4
-rw-r--r--include/app_internal.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/include/app.h b/include/app.h
index 7901d33..381c3c0 100644
--- a/include/app.h
+++ b/include/app.h
@@ -67,8 +67,10 @@ void app_reap(app_t *a);
void app_compose(app_t *a, screen_t *s);
/* Show the logo splash for splash_ms, centered over everything, wearing a
- * different shader effect each time. Called on attach; any input ends it. */
+ * different shader effect each time. Called on attach; any input ends it.
+ * app_splash_fx picks the effect by index (wrapped); -1 lets the clock. */
void app_splash(app_t *a);
+void app_splash_fx(app_t *a, int fx);
/* Bytes straight into the focused pane's pty (the harness's `raw`). */
void app_write_focused(app_t *a, const void *buf, size_t len);
bool app_should_quit(const app_t *a);
diff --git a/include/app_internal.h b/include/app_internal.h
index 441bbd4..9af6a04 100644
--- a/include/app_internal.h
+++ b/include/app_internal.h
@@ -264,8 +264,10 @@ struct app {
/* The logo splash: shown until this instant, 0 for not at all. Set when a
* client attaches (app_splash), ended early by any key or click. The
- * timestamp doubles as the seed that picks which effect this one wears. */
+ * timestamp doubles as the seed that picks which effect this one wears,
+ * unless splash_fx (>= 0, from the control API) already chose. */
int64_t splash_until;
+ int splash_fx;
};
/* One config per process, owned by app.c (ensure_config/app_reload_config