This zsh plugin adds an old skool ansi art based motd when the login shell is executed
I grew up in the day's of BBS's and ansi art so I wanted something to replicate the experience of jumping onto a new BBS everytime I started my login shell
For Mac/Linux using Homebrew you can install coreutils using
brew install coreutils
- fd a modern
find
replacement, it will use this preferentially if it's installed otherwise fallback tofind
- pv a pipe viewer which can limit the art rendering speed to emulate the feel of an old skool BBS
# for znap
znap source yuhonas/zsh-ansimotd
# for antigen
antigen bundle yuhonas/zsh-ansimotd
# for zplug
zplug "yuhonas/zsh-ansimotd"
# manually
# Clone the repository and source it in your shell's rc file
After installation you'll need to download some ansi art for it to randomly display, I suggest a few places
Head over to 16colo.rs and if you find a year(s) you like you can download everything from that year using their rsync mirror
eg. to download everything from 1996 to the ANSI_MOTD_ART_DIR
rsync -azvhP --include '*/' --include '*.ANS' --exclude '*' rsync://16colo.rs/pack/1996 "$ANSI_MOTD_ART_DIR"
Find a pack you like at artscene and unpack it into the ansi motd config directory
You can do this by
Use ansi_art_download to download all zip files of ansi art from a url and unpack them into the ansi motd config directory (this can take a while depending on the amount of ansi art contained in that year)
eg. to download all ansi art from 1996
from the url http://artscene.textfiles.com/artpacks/1996/ run the following in your shell
ansi_art_download http://artscene.textfiles.com/artpacks/1996/
Copy any .ans
, .img
or .asc
files containg ansi art into your ANSI_MOTD_ART_DIR
directory which is derived from ${XDG_CONFIG_HOME:-$HOME/.config}/ansimotd
(the plugin performs a recursive search for art so any directory nesting is fine)
The plugin exports the following useful variables to the session
ANSI_MOTD_ART_DIR
- the full path to the config directory where the plugin will search for ansi artANSI_MOTD_FILENAME
- the full file path to the last shown peice of ansi art, if you want to do something with it, laud over it, delete it etc
There's also a handful of ENV variables you can use to configure the plugin (these will need to be set prior to plugin instantiation)
To buffer the ansi art output at a fixed speed you can set the ANSI_MOTD_RATE_LIMIT_OUTPUT
ENV variable
eg. to limit the ansi art rendering rate to a data rate of 8k
export ANSI_MOTD_RATE_LIMIT_OUTPUT="8k"
See also Pull Request #10 to see it in action
If you happen to be running on a small fixed screen perhaps on something like termux you can set the following ENV variable to truncate the art to screen width
export ANSI_MOTD_DISABLE_LINE_WRAPPING=1
See also Pull Request #6
Art to be displayed is assumed to use the Code Page 437 character set
This project is licensed under the MIT license
Made with contrib.rocks.