Skip to content

Repository files navigation

XFetch bannerEffects

License Platform Rust

Installable intro animations for xfetch — written in Rust.

Features

Effects change the way the info appears when xfetch starts: the core renders the module lines, hands them to an effect binary (xfetch-effect-<name>), and plays the returned frames before settling on the final content.

EffectDescription
decrypt Reveals each line from scrambled glyphs (smooth decode).
glitch Stuttery scrambled flicker with corruption bursts, horizontal slices and dropped rows.

Quick Install

xfetch effects install <name>     # e.g. decrypt, glitch

Or from a local path:

xfetch effects install ./effects/decrypt

Manage installed effects:

xfetch effects list               # list installed effects
xfetch effects remove <name>      # remove an effect

Effects are opt-in: without the binary installed, xfetch renders normally. Use --repo <url> or the XFETCH_EFFECT_REPO env var to install from a fork or mirror.

Configuration

Add an "effects" block to your config.jsonc. It accepts a single effect or a list — effects play in sequence.

// Configuration for xfetch
{
  // Effects to play at startup (in order)
  "effects": [
    { "plugin": "glitch", "duration_ms": 700, "fps": 30 },
    { "plugin": "decrypt", "duration_ms": 1500, "fps": 30 }
  ],
  "modules": ["os", "cpu", "memory"]
}
Field Type Default Description
plugin string Effect name (binary xfetch-effect-<name>).
style string none Effect-specific style selector.
duration_ms number effect default Total animation length in ms.
fps number effect default Frames per second.
args object none Free-form parameters passed to the effect.
timeout_secs number none Safety net: kills the effect if it runs longer.

Writing an Effect

Effects speak the xfetch-effect-api protocol (see xfetch-cli/api): read an EffectRequest from stdin (the rendered lines plus style/duration_ms/fps/args) and write an EffectResponse with a non-empty list of { delay_ms, lines } frames. The last frame should reach the final content.

Use the shared xfetch-effects-lib for ANSI-safe text helpers so escape sequences (colors/icons) are never broken apart.

Structure

effects/
├── Cargo.toml            # workspace
├── effects-lib/          # shared ANSI-safe helpers (xfetch-effects-lib)
└── <effect-name>/        # one crate per effect (binary xfetch-effect-<name>)
    ├── Cargo.toml
    ├── README.md
    ├── CHANGELOG.md
    ├── configs/          # example config snippets
    └── src/main.rs

Contribute to the project, report issues, or connect with the developer using the links around

X

X Web & X Github Profile & Xscriptor web