Skip to content

dnvsfn/glowdrift

Repository files navigation

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.

About

An original truecolor terminal screensaver: rainbow flow-field particles with pluggable motion models. Pure-Python, dependency-free, MIT.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors