bgen

Wallpaper generator for terminal color palettes, with 365 Gogh themes, pattern generators, and glitch effects

readme · slastra/bgen

Wallpaper generator for terminal color palettes, with 365 Gogh themes, pattern generators, and glitch effects.

It uses the Gogh theme collection (365+ themes) with pattern generators and glitch art post-processing.

Patterns (Rosé Pine)

FBM clouds Mono accent Voronoi cells (quantized)
fbm mono worley
Gradient Hexagons
gradient hexagons

Glitch art

Kaleidoscope Melting kaleido Deep ocean
mirror,wobble,rgb-split mirror,posterize,melt wobble,ghost,static
kaleidoscope melting ocean

Patterns

Pattern Description
gradient Linear gradient at any angle
radial Radial gradient from center
noise Perlin noise
fbm Fractal Brownian Motion (layered noise)
ridged Ridged multi-fractal (sharp ridges)
worley Voronoi / cellular noise
diamonds Repeating diamond grid
hexagons Honeycomb pattern
stripes Angled stripes
waves Sine wave interference
plasma Classic plasma effect

Glitch effects

Stack any combination with -g effect1,effect2,...

Effect Description
rgb-split Chromatic aberration
scanlines CRT scanline overlay
pixel-sort Sort pixels by brightness in rows
jitter Random horizontal row displacement
melt Pixels drip downward
vhs VHS tracking + noise bands + color bleed
shift Horizontal band displacement + channel corruption
wobble Sinusoidal spatial warping
pixelate Mosaic block effect
posterize Reduce color depth (bit crush)
mirror Kaleidoscope / reflection
static TV static noise overlay
ghost Echo/duplicate with offset

Control intensity with --glitch-intensity 0.0-1.0 (default 0.5).

Install

cargo install --path .
bgen --fetch  # download Gogh themes on first run

365+ themes from Gogh. Run bgen --fetch to download, then browse with bgen --list or bgen --search.

bgen --fetch downloads the Gogh themes.json with curl into ~/.config/bgen/ (or $XDG_CONFIG_HOME/bgen/).

Usage

# Pick a theme and pattern
bgen -t "Rosé Pine" -p fbm -o wallpaper.png

# Control which accent colors appear (background is always the base)
bgen -t "Rosé Pine" --accent 5,6 -p fbm          # blue + magenta
bgen -t "Rosé Pine" --accent 5 -p fbm             # single accent (mono)
bgen -t "Rosé Pine" --full -p fbm                  # all 16 colors

# Adjust the pattern
bgen -t "Dracula" -p ridged --scale 3.0 --seed 42
bgen -t "Nord" -p worley --quantize                 # snap to discrete colors

# Layer two patterns
bgen -t "Rosé Pine" -p fbm --blend-with radial --blend-mode overlay

# Add glitch effects (composable, applied in order)
bgen -t "Rosé Pine" -p fbm -g vhs,rgb-split,scanlines --glitch-intensity 0.6

# Slot machine — randomize everything, keep your theme
bgen -t "Rosé Pine" --random -o wallpaper.png

# Custom resolution
bgen -t "Rosé Pine" -p fbm -W 3840 -H 2160 -o wallpaper.png

# Browse themes
bgen --list
bgen --search "rose"

Random mode

bgen -t "Rosé Pine" --random

Randomizes pattern, scale, accents, glitch effects, and intensity. Prints a reproducible command so you can recreate anything you like:

  RANDOM ROLL
  ───────────────────────────────────
  Theme:     Rosé Pine
  Pattern:   ridged
  Scale:     4.2
  Accents:   5, 14
  Glitch:    wobble, rgb-split
  Intensity: 0.63
  Seed:      8472938
  ───────────────────────────────────

  bgen -t "Rosé Pine" -p ridged --scale 4.2 --accent 5,14 --seed 8472938 -g wobble,rgb-split --glitch-intensity 0.63

Options

bgen [OPTIONS]

  -t, --theme <NAME>           Gogh theme name
  -p, --pattern <TYPE>         Pattern type [default: fbm]
  -W, --width <PX>             Image width [default: 1920]
  -H, --height <PX>            Image height [default: 1080]
  -o, --output <PATH>          Output file [default: wallpaper.png]
  -s, --seed <NUM>             Random seed for reproducibility
      --scale <FLOAT>          Pattern scale [default: 4.0]
      --octaves <NUM>          Noise octaves [default: 6]
      --angle <DEG>            Gradient/stripe angle [default: 45]
      --quantize               Snap to nearest palette color
      --colors <HEX,HEX,...>   Custom colors as comma-separated hex values
  -a, --accent <N,N,...>       Accent color indices (1-16)
      --full                   Use all 16 palette colors
      --blend-with <TYPE>      Layer a second pattern
      --blend-mode <MODE>      multiply|screen|overlay|add|difference
  -g, --glitch <E,E,...>       Glitch effects to apply
      --glitch-intensity <F>   Effect intensity 0.0-1.0 [default: 0.5]
  -r, --random                 Randomize pattern, accents, and effects
      --list                   List available themes
      --search <QUERY>         Search themes by name
      --fetch                  Download Gogh themes

Hyprland integration

Generate a random wallpaper on a hotkey:

# ~/.config/hypr/scripts/random-wallpaper.sh
#!/bin/bash
WALLPAPER="$HOME/Pictures/wallpaper/bgen-random.png"
bgen -t "Rosé Pine" --random -W 3840 -H 2160 -o "$WALLPAPER" 2>/dev/null
hyprctl hyprpaper preload "$WALLPAPER" >/dev/null 2>&1
hyprctl hyprpaper wallpaper "HDMI-A-1,$WALLPAPER" >/dev/null 2>&1
# ~/.config/hypr/binds.conf
bind = $mainMod SHIFT, B, exec, bash ~/.config/hypr/scripts/random-wallpaper.sh

Development

cargo build --release

Credits

  • Color schemes: Gogh