- Lua 87.5%
- Haskell 10.4%
- Nix 2.1%
| app | Don't output blank lines | |
| .gitignore | Base Cabal Project | |
| default.nix | Base Cabal Project | |
| example-input.txt | Add example input and output files | |
| example-output.lua | Add example input and output files | |
| example.png | Add README | |
| flake.lock | Update flake | |
| flake.nix | Update Nix stuff | |
| LICENSE | Add MIT LICENSE | |
| package.nix | Update Nix stuff | |
| project.nix | Base Cabal Project | |
| README.md | Add link to catimg in README | |
| shell.nix | Program is working! | |
| term2alpha.cabal | Program is working! | |
term2alpha
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 Usage
How I created the above example.
Generate the alpha header with the following command using catimg:
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')
require('alpha').setup(dashboard.config)
Limitations
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.