Skip to content

zenflow00/drift

 
 
·  ·    ·        ·     ·    ·  ·
    ·      d r i f t      ·
  ·    ·        ·    ·       ·

A terminal screensaver that turns idle time into ambient art.

Every OS has a screensaver. The terminal had nothing — until now.

Go License Release CI



Scenes

drift ships four animations. They cycle automatically or you can lock to one.

waveform — braille sine waves that breathe

constellation — stars drift and connect

rain — katakana characters fall in columns

particles — a flow field of drifting glyphs

Themes

Seven built-in themes matched to popular terminal colorschemes.

cosmic · nord · dracula · catppuccin · gruvbox · forest · mono

drift list themes    # preview all themes with color swatches

Installation

Option 1 — Pre-built binary (no Go required)

  1. Go to the Releases page.

  2. Download the archive for your platform:

    OS Chip File
    macOS Apple Silicon (M1/M2/M3) drift_darwin_arm64.tar.gz
    macOS Intel drift_darwin_amd64.tar.gz
    Linux x86-64 drift_linux_amd64.tar.gz
    Linux ARM64 drift_linux_arm64.tar.gz
  3. Extract and move it somewhere on your PATH:

    tar -xzf drift_darwin_arm64.tar.gz
    sudo mv drift /usr/local/bin/
    drift version

Option 2 — Go install

go install github.com/phlx0/drift@latest

Make sure Go's bin directory is on your PATH:

# add to ~/.zshrc or ~/.bashrc
export PATH="$PATH:$(go env GOPATH)/bin"

Option 3 — Build from source

git clone https://github.com/phlx0/drift
cd drift
go install .

Requires Go 1.23+. No C compiler or CGO needed.


Shell integration

Shell integration is what makes drift a real screensaver — your shell detects idleness and launches drift automatically. Press any key to return to your prompt.

Zsh

# add to ~/.zshrc
export DRIFT_TIMEOUT=120   # seconds of inactivity (default: 120)
eval "$(drift shell-init zsh)"

Bash

# add to ~/.bashrc
eval "$(drift shell-init bash)"

Fish

# add to ~/.config/fish/conf.d/drift.fish
drift shell-init fish | source

Usage

drift                            start immediately (shell integration mode)
drift --scene waveform           lock to a specific scene
drift --theme catppuccin         override the color theme
drift --duration 30              cycle scenes every 30 seconds

drift list scenes                list all scenes
drift list themes                list themes with color swatches
drift shell-init zsh|bash|fish   print shell integration snippet
drift config                     show effective configuration
drift config --init              write default config to ~/.config/drift/config.toml
drift version                    print version info
Flag Default Description
--scene, -s cycle all lock to a specific scene
--theme, -t cosmic color theme
--fps 30 target frame rate
--duration 60 seconds per scene, 0 = no cycling

Configuration

drift config --init   # writes ~/.config/drift/config.toml
[engine]
fps           = 30
cycle_seconds = 60    # 0 = stay on one scene
scenes        = "all"
theme         = "cosmic"
shuffle       = true

[scene.constellation]
star_count      = 80
connect_radius  = 0.18
twinkle         = true
max_connections = 4

[scene.rain]
charset = "アイウエオカキクケコサシスセソタチツテトナニヌネノ0123456789"
density = 0.4
speed   = 1.0

[scene.particles]
count    = 120
gravity  = 0.0
friction = 0.98

[scene.waveform]
layers    = 3
amplitude = 0.70
speed     = 1.0

Contributing

New scenes and themes are very welcome. See CONTRIBUTING.md for the development guide.


MIT License · made by phlx0

press any key to resume

About

Terminal screensaver that activates when you're idle — constellations, rain, particles & braille waves. Press any key to resume.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Go 97.8%
  • Makefile 2.2%