Skip to content
animfetch
Menu

Usage

Modes

The four ways to run animfetch - pinned, played, once, or interactive - and when to use each.

animfetch has four modes. Which one you want depends on whether you are putting it in a shell startup file, running it by hand, or using it as a launcher.

sh
animfetch --pin      # pin above your own shell, keep animating in background
animfetch --play     # animate in place for a few seconds, then exit
animfetch --once     # print one static frame and exit
animfetch            # interactive: animfetch owns the prompt

Pinned: --pin#

This is the one you want. It sets a scroll region so the top rows never scroll, then detaches and paints them while your own shell runs underneath, with its history, completion and aliases intact.

A terminal holds one pin. A bare animfetch --pin, which is what a shell's startup file runs, leaves a pin that is already there alone, so nested shells stay quiet. --pin with settings replaces it:

sh
animfetch --pin --no-color       # takes over from the pin already running

A run with --save does not replace it. It writes the settings, says so, and leaves that terminal as it is; terminals you open afterwards start with them.

Undo it with:

sh
animfetch --unpin

If a terminal is ever left in an odd state, --unpin restores it. Pinned mode also redraws when the terminal is resized.

Played: --play#

Animates in place for a few seconds, then exits and leaves you at your shell. The length is play_seconds in the config (default 3), or -s for one run:

sh
animfetch --play -s 1.5

It is a good fit for a shell startup file when you want a short intro rather than a permanent fetch.

Once: --once#

Prints a single static frame and exits. Piped output and NO_COLOR=1 fall back to this automatically, so it is safe in scripts and the quickest way to compare settings:

sh
animfetch --once --info card
animfetch --once --no-color | head

Interactive: no flag#

The fetch is pinned at the top and animfetch runs its own prompt below. It is a launcher with a prompt, not a shell. See Interactive mode.

Which to use#

You wantUse
The fetch always visible while you work--pin in your shell startup file
A short intro, then a normal prompt--play
A static print, in a script or to compare styles--once
A tiny launcher with the fetch above itno flag

Colour and pipes#

Colour is turned off automatically when output is not a terminal or NO_COLOR is set: no colour codes are sent at all, so the terminal's own colours show.

--no-color draws everything in shades of grey, with no hue anywhere, and the light and dark of the art and the text stay. Picture borders are taken to grey with the rest; they are left out when output is piped. --def-color is the way back: the default colours, from your theme. Both can be kept with --save.