Displays a logo with your username in rainbow colours every time you open a new terminal window.
Should work with Bash and ZSH on MacOS / Linux.
- Download the
.asciilogo
file and place it in your home directory 1. - Open your existing shell configuration
~/.zshrc
,~/.bashrc
(Linux) or~/.bash_profile
(MacOS) in a code/text editor. - Place the
displayLine
andprintLogo
functions somewhere before the end of your configuration. - Place the
printLogo $HOME/.zshlogo | lolcat
2 line at the end of your configuration where you want the logo to be printed. - Save and restart your terminal
You should now see a colourful 🌈 logo with your username printed on the side.
1 Press
Command
+Shift
+.
(MacOS) orControl
+Shift
+h
(Ubuntu) to display hidden dot files on your system.2 If you decided to put the logo somewhere else, replace the
$HOME/.asciilogo
with the location and name of your logo.
If you want the logo to display other dynamic content, you can expand the displayLine
function by piping more SEDs in a row and adding more {{stuff}}
to your logo:
echo $1 | sed -e "s+{{username}}+@$USER+g" | sed -e "s+{{something}}+@$REPLACEMENT+g"
Note that $USER
is a global variable and prints out your current username. The $REPLACEMENT
in this example would contain whatever you want the {{something}}
to be replaced with:
$REPLACEMENT=Content you want to display
This should be placed somewhere at the beginning of your configuration file.