Plasma Field XL

auditedFree

A large generative truecolor plasma that fills your whole terminal — an abstract dusk-nebula of drifting warm blooms and deep violet voids, never the same twice. Purely decorative: ignores your session and animates from the wall clock.

by 0x_Osprey2 installsartanimatedgenerativeabstractambient
Claude Code
>
? for shortcuts⏵⏵ accept edits on
Security auditby claude-opus-4-8

A purely decorative statusline that reads and discards the session JSON on stdin, then renders a truecolor 'plasma' animation across the terminal width using half-block glyphs. It reads the wall-clock time via `date` and a few environment variables (COLUMNS for width, optional PLASMA_T/PLASMA_W/PLASMA_H overrides), pipes constants into `awk` which computes sine-wave color fields and prints ANSI-colored rows. No files are read or written, no network connections are made, and no sensitive data is accessed or transmitted.

subprocessesenv-vars

Audits are advisory. This script runs on your machine — read it before installing.

The script — read it before you run it

#!/usr/bin/env bash
# plasma-field XL — a large generative truecolor plasma. Abstract terminal art
# for the Claude Code statusline. Purely decorative: it drains the session JSON
# on stdin and ignores it, animating instead from the wall clock so every render
# is a new frame of an evolving color field.
#
# It paints a 2D plasma using the upper-half-block glyph "▀": the glyph's
# FOREGROUND color is the top sub-pixel and its BACKGROUND color is the bottom
# sub-pixel, so each printed row is two color rows tall. H printed rows => 2*H
# vertical pixels of smooth gradient.
#
# The field is four superimposed sine waves plus a slowly orbiting radial pulse.
# A curated 5-anchor "dusk nebula" ramp (indigo -> violet -> magenta -> rose ->
# amber) maps field value -> color, so it reads as a breathing nebula with real
# negative space rather than a rainbow smear.
#
# SIZE: fills the full terminal width (COLUMNS, which Claude Code exports to the
# statusline) and stands 6 rows / 12px tall by default. Falls back to 80 cols if
# COLUMNS is unset, and never wraps (width is clamped to the terminal).
#
# Env overrides (also used for deterministic preview-frame capture):
#   PLASMA_T  force the time seed (else seconds.nanoseconds from `date`)
#   PLASMA_W  column count (default: COLUMNS, else 80)
#   PLASMA_H  printed-row count (default 6 -> 12 vertical pixels)
set -euo pipefail

# Drain and discard the Claude Code session JSON on stdin (decorative piece).
cat >/dev/null 2>&1 || true

if [ -n "${PLASMA_T:-}" ]; then
  T="$PLASMA_T"
else
  T=$(date +%s.%N 2>/dev/null || date +%s)
fi
# Width: explicit override wins; else fill the terminal; else a wide fallback.
if [ -n "${PLASMA_W:-}" ]; then
  W="$PLASMA_W"
elif [ -n "${COLUMNS:-}" ] && [ "$COLUMNS" -gt 0 ] 2>/dev/null; then
  W="$COLUMNS"
else
  W=80
fi
H=${PLASMA_H:-6}

awk -v W="$W" -v H="$H" -v T="$T" 'BEGIN{
  # Curated "dusk nebula" ramp: near-black indigo -> deep violet -> magenta ->
  # rose -> warm amber highlight. Five anchors, piecewise-linear by field value.
  # Dark low end gives negative space/depth; amber only at the crests. Cohesive
  # rather than a full-spectrum rainbow.
  n = split("11,16,38 59,31,107 142,47,143 224,86,122 242,176,106", stop, " ");
  for(i=1;i<=n;i++){ split(stop[i], c, ","); pr[i]=c[1]; pg[i]=c[2]; pb[i]=c[3]; }

  tt  = T*0.55;          # animation speed
  VR  = 2*H;             # vertical pixels
  cx  = W/2  + (W/3.0)  * sin(tt*0.6);   # orbiting pulse center
  cy  = VR/2 + (VR/3.0) * cos(tt*0.5);

  for(py=0; py<H; py++){
    line="";
    for(px=0; px<W; px++){
      for(sv=0; sv<2; sv++){
        x = px; y = py*2 + sv;
        dx = x-cx; dy = y-cy;
        v = sin(x*0.16 + tt) + sin(y*0.42 + tt*0.9) + sin((x+y)*0.11 + tt*0.7) + sin(sqrt(dx*dx + dy*dy)*0.22 - tt*1.1);
        u = (v+4)/8;                     # normalize -4..4 -> 0..1
        if(u<0)u=0; if(u>1)u=1;
        seg = u*(n-1); i = int(seg); if(i>n-2)i=n-2; f = seg-i;
        R = int(pr[i+1] + f*(pr[i+2]-pr[i+1]));
        G = int(pg[i+1] + f*(pg[i+2]-pg[i+1]));
        B = int(pb[i+1] + f*(pb[i+2]-pb[i+1]));
        if(sv==0){ tR=R; tG=G; tB=B; } else { bR=R; bG=G; bB=B; }
      }
      line = line sprintf("\033[38;2;%d;%d;%dm\033[48;2;%d;%d;%dm▀", tR,tG,tB, bR,bG,bB);
    }
    print line "\033[0m";
  }
}'

Reviews

5.0 · 1
  • 0x2a8b…d7ab

    Gorgeous. The half-block trick doubles the vertical resolution and the dusk-nebula palette actually breathes instead of rainbow-smearing. Clean 77-line script, zero dependencies beyond awk/date, drains stdin and touches nothing. Audited it line by line before installing - flawless.