Create neovim alpha headers from terminal output

New ticket tracker added

a month ago

New mailing list added

a month ago


This is a program to create headers for Alpha, the Neovim greeter from the ANSI colored output of other terminal commands. Namely, catimg, a program for rendering images in the terminal.

Example, my alpha header

#Example Usage

How I created the above example.

Generate the alpha header with the following command:

catimg -H 30 pfp.png | term2alpha > header.lua

The -H flag from catimg controls the height of it's output. term2alpha does not do any resizing, so make sure the terminal output you're feeding into it is the desired size.

The in your Neovim config, require the generated header.lua and set that as one of the sections in your alpha config:

local dashboard = require('alpha.themes.dashboard')
dashboard.config.layout[2] = require('header')


term2alpha has only been tested on catimg output at this time and may not work correctly on other terminal output. As of now, it only supports 24bit color codes, and ignores other ANSI control sequences.