Skip to main content

A generative rainbow flow-field terminal screensaver

Project description

glowdrift

An original full-frame terminal screensaver. Rainbow particles drift through an organic, slowly-evolving flow field, depositing additive glow that decays into trails on a dark background. Truecolor, half-block rendering (two pixels per character row), keyboard-controlled, quits on q.

preview

Install

Homebrew (macOS / Linux):

brew install dnvsfn/tap/glowdrift

pipx (any platform):

pipx install glowdrift               # or:  pip install --user glowdrift
pipx install 'glowdrift[render]'     # + Pillow, for PNG output

From source:

git clone https://github.com/dnvsfn/glowdrift
cd glowdrift
make install                 # copies to ~/.local/bin/glowdrift

Make sure ~/.local/bin is on your PATH (or sudo make install PREFIX=/usr/local).

Live playback is pure Python 3 (3.8+) with no dependencies; Pillow is only needed for the PNG-output flags (--render, --gallery, --contact).

Run

glowdrift                       # screensaver: drift between presets (any key quits)
glowdrift --still               # hold one fixed default look instead
glowdrift aurora                # a named preset, held (see below)
glowdrift synthwave --speed 2   # a preset with one knob overridden
glowdrift --random --seed 12    # roll a whole random look from a seed
glowdrift --swirl 0.2 --flow-bias 25              # parallel streams flowing down-right
glowdrift --hue-center 205 --hue-range 70         # limit to a blue/cyan palette
glowdrift --colors 3 --edge 0.9                   # 3 crisp colors, hard-edged strokes

Screensaver mode

With no arguments, glowdrift runs as a screensaver: it slowly drifts from one look to the next forever, crossfading the flow so the trails carry across each transition (no hard cuts). Naming a preset or setting any knob instead holds that single look; --still forces the fixed default look.

glowdrift                                          # the default: drift through the presets
glowdrift --cycle --random                         # drift through endless random rolls
glowdrift --cycle-hold 30 --cycle-fade 12          # linger longer, morph slower

Playing live

While it's running, glowdrift is interactive. Press h for the on-screen help; a status bar shows the current look and the selected knob.

key action key action
[ ] previous / next preset 1-0 jump to a preset
m M step the motion model d D step the direction field
r roll a random look c toggle the auto-cycle drift
select a knob (or + -) dial it live
k kaleidoscope fold x pixelate blocks
g glitch i / l dither / scanlines
space pause s pin this look to ~/.glowdrift-pins
h ? toggle help q Esc quit

Touching any control drops out of the auto-cycle so your edits stick, and the exact flags to reproduce whatever you were watching print when you quit.

Pattern & render styles

Opt-in layers that restyle any look (composable, and toggleable live):

glowdrift aurora --symmetry 6      # kaleidoscope: N-fold mirror into a mandala
glowdrift neon --pixelate 4        # chunky NxN pixel blocks
glowdrift synthwave --glitch 0.6   # row tearing + RGB channel split
glowdrift oceanic --dither         # ordered dithering, retro halftone
glowdrift aurora --scanlines       # dim alternate rows, CRT look

(--cycle requests cycling explicitly. It's implied by a bare launch, but you need it to cycle random rolls, since --random on its own holds one fixed look. --cycle-hold / --cycle-fade also imply it.)

Presets

Twenty-eight hand-tuned looks, each with its own motion model, and many now baking in a kaleidoscope or render style. Run one by name; any flag you add still overrides it (glowdrift synthwave --speed 2, glowdrift mandala --symmetry 3).


auroracurl eddies, green/teal/violet, slow

nebulaorbit swirl, violet/indigo cosmic bloom

emberinertial flames rising, warm reds/orange

oceanicflow strands drifting sideways, blue/cyan

neoninertial sweeps, scanlined arcade rainbow

whirlpoolflow vortices, blue/cyan water swirl, fills the frame

sonarflow ripples, dithered green scope

synthwaveflow streams, magenta + cyan, scanlined

mosscurl eddies, dense soft greens

prismharmonograph loops as a rainbow gem

smokejitter drift, cool tinted haze

bloomspiral petals mirrored into a flower mandala

pinwheelspin field, rainbow rotating vortex

riftsaddle field, cool hyperbolic streams

swarmlevy bursts, clustered whirlpools

chaospendulum swings, energetic red/gold fire cloud

mandala — 6-fold curl kaleidoscope, full rainbow

rosette — 8-fold harmonograph lace rosette

snowflake — 6-fold saddle, dithered icy crystal

gyro — 4-fold pendulum, chaotic rainbow mandala

arcade — pixelated + scanlined inertial neon

8bit — chunky pixelated flow vortices, amber/gold

datamosh — heavy glitch tearing, magenta/cyan

signallevy ripples, glitched broken transmission

halftonecurl swirls, magenta pop-art dither

plasmacurl flow, emerald demoscene dithered plasma

terminalflow waves, dithered green CRT

vhsspin vortex, glitched + scanlined tape
glowdrift --list              # list presets with their motion + mode
glowdrift --gallery --out /tmp/presets   # render every preset to a labeled grid

Previews live in previews/; regenerate them with make-previews.sh.

Pure Python 3, no dependencies (PIL only needed for --render/--contact). Best in a truecolor terminal (iTerm2, Terminal.app, etc.); on terminals without truecolor it falls back to the xterm-256 palette automatically (force either way with --color truecolor|256).

Every run prints the exact flags to reproduce it, so when --random rolls a look you like you can pin it or tweak one knob:

glowdrift mode=vortices (rolled 17 knobs)
  reproduce: glowdrift --seed 12 --mode vortices --flow-scale 1.7 ...

Playing with the flow

Two independent axes drive the movement: the motion model (how a particle moves) and the direction field (which way it points). Mixing them is where the variety comes from, e.g. glowdrift --motion orbit --mode ripple.

--motion (how particles move):

motion movement
flow smooth advection along the field (drifting strands)
curl divergence-free turbulence, coils into eddies, never bunches
inertial momentum: comet-like sweeps that bank and overshoot
orbit gravity toward drifting attractors, orbiting swirls + slingshots
spiral differential rotation around a center (galaxy arms)
harmonograph parametric lissajous loops (a cloud of nested curves)
jitter brownian drift, a grainy diffuse cloud
levy heavy-tailed flight: small drifts with rare long leaps, bursty and clustered
pendulum each particle a chaotic double pendulum, swinging looping arcs

--mode (the direction field, used by flow / inertial / jitter / levy): waves (combed streams), vortices (whirlpools), ripple (concentric petals), spin (a breathing pinwheel), saddle (a rotating hyperbolic push/pull).

Other flow knobs:

knob what it does
--flow-bias DEG global flow direction in degrees (0=right, 90=down, 270=up)
--swirl 0..1 0 = everything flows toward the bias direction, 1 = full field swirl
--flow-scale swirl zoom (cycles across the canvas)
--flow-drift how fast the field evolves over time
--flow-spread angle variation (higher = more curl / chaos)

Color / shape knobs:

knob what it does
--hue-center DEG / --hue-range DEG limit colors to a slice of the wheel (range 360 = full rainbow)
--colors N quantize to N discrete colors (0 = continuous)
--edge 0..1 shape edge: low = soft wispy strands, high = hard crisp strokes

Other look knobs: --speed, --decay (trail length), --exposure (bloom), --saturation, --hue-spread, --hue-drift, --hue-jitter, --glow-radius, --glow-softness, --density (lower = more particles). Run glowdrift --help for every default and random range. --random rolls all of them from --seed; any knob you pass explicitly is kept fixed while the rest are randomized.

Browse a bunch of looks at once

glowdrift --contact 12 --out /tmp/sheet   # grid of 12 random variants, labeled by seed

Eyeball the grid, then run glowdrift --random --seed N for the one you like.

How it looks the way it does

  • Organic motion comes from a flow field built from summed drifting sinusoids, so the swirls evolve continuously and never repeat.
  • Rainbow is a diagonal hue gradient across the canvas that slowly rotates over time, so the whole wheel is on screen at once and drifts.
  • Glow is additive: each particle stamps a soft radial kernel, the field decays ~10% per frame for trails, and a hue-preserving 1 - e^(-x) tone-map gives the bloom rolloff while keeping the background black. Mapping the brightest channel and scaling the others by the same factor keeps dense overlaps saturated instead of washing them to white.

Look without a terminal

Render a warmed-up frame to a PNG (handy for tuning):

glowdrift --render 200 --out /tmp/gd --width 160 --height 48

Options

flag default meaning
--fps 30 frame-rate cap
--seed 1 changes the composition
--render N - headless: simulate N frames, write a PNG, exit
--out /tmp/glowdrift PNG path prefix for --render
--width / --height 160 / 48 canvas size (cols/rows) for --render

License

MIT, see LICENSE. Copyright (c) 2026 E. T. Carter · dnvsfn.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

glowdrift-0.1.1.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

glowdrift-0.1.1-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file glowdrift-0.1.1.tar.gz.

File metadata

  • Download URL: glowdrift-0.1.1.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for glowdrift-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fd7b3f9491ce0f8617d6dfea070c38578156a793d96f229530206e7e2ae9245d
MD5 585687c3987994f92e7361ceae669ab6
BLAKE2b-256 39df07e8ee968947cf214fe3c5e89e4817f2f10265021808ebc5e3d66eeb5533

See more details on using hashes here.

File details

Details for the file glowdrift-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: glowdrift-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for glowdrift-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3c3c4807778e2ac07132ad8d1b866026dc00e19f534338fafe6d9100f94f7434
MD5 86ce64bb265618878ab6f5d7fe306253
BLAKE2b-256 217e5806e88771fab8e6aad16f57fc7de19ea594444170c38a617583a67da905

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page