Skip to content

slastra/bgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bgen

Generate wallpapers from terminal color palettes. Uses the Gogh theme collection (365+ themes) with pattern generators and glitch art post-processing.

Gallery

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

Install

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

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"

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).

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

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

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
  -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

Theme Sources

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

About

Generate wallpapers from terminal color palettes. 365+ Gogh themes, 11 pattern generators, 13 glitch effects, slot machine randomizer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages