aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmd.c
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 /src/cmd.c
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 'src/cmd.c')
-rw-r--r--src/cmd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd.c b/src/cmd.c
index 734fe8b..4fe6bad 100644
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -428,8 +428,10 @@ static char *cmd_json(app_t *a, screen_t *s, input_parser_t *in,
}
if (strcmp(cmd, "splash") == 0) {
/* The attach greeting, on demand -- which is also what makes it testable
- * from a scripted session, where nobody ever attaches. */
- app_splash(a);
+ * from a scripted session, where nobody ever attaches. `fx` picks the
+ * effect by index instead of by the clock: a test needs a deterministic
+ * one, and "show me the aurora again" deserves an answer too. */
+ app_splash_fx(a, (int)jv_geti(req, "fx", -1));
return jok_int(NULL, 0);
}
if (strcmp(cmd, "reload") == 0) {