I decided to give my laptop a virtual makeover recently. One thing that stuck out was the terminal.
A terminal is a dark rectangle with text. It’s utilitarian. There isn’t a lot of options for making it stylish, but you can make it feel more personal with a few changes.
The 3 major things you can do is:
I guess these 3 things are what most people do in some shape or form.
And this is how my terminal looks! Simple and minimal is my preference.
Beyond that, you can make tweaks to use colours in more places. You can make aliases which include the
--colors=auto option. These are the most common ones:
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
If you use Zsh, you can add syntax highlighting to the commands you type, as you type. You can configure this yourself in your
.zshrc, or use the zsh-syntax-highlighting plugin (script) to make it more straightforward.
You can see that when an incorrect command is typed, it is colored in red.
Many people add this through Oh My Zsh, but it is not necessary to install Oh My Zsh. You just need to download the script somewhere and
source the script in your
# leave as last source command
Bash does not have an equivalent capability, unfortunately. There may be a script out there that does this, I haven’t searched!
You can install command-line applications if you want to augment the appearance of some standard applications. For example, you can use
exa instead of
You can see that
lsd uses a folder icon from the nerd font for folders, and breaks the list into columns. These applications offer some visual tweaks, but vary on the amount of styling you can do. I chose
lsd because it offers a bit more control over appearance than
The default colour for directories is bold blue, and bold yellow for files. These colours are not sourced from your colour scheme. If you want to change these colours and use colours from your colour scheme, you need to change the
LS_COLORS variable. You can read this guide on how to do this.
You can use
bat instead of
cat to add syntax highlighting to output.
If you add the following to your shell configuration file, you will get highlighted man pages (as above).
# this uses bat (called batcat on debian)
# to colorize man pages
export MANPAGER="sh -c 'col -bx | batcat -l man -p'"
Overall, this feels more personal as it is closer to my taste, but it still lacks personality. What can I do to add more personality?
Some people like to make the terminal slightly transparent and show their desktop wallpaper. I don’t! I love photography but I find this too distracting!
I noticed that some people use neofetch to flash their specs when they open a terminal. It’s kind of badge of honour for some Linux enthusiasts.
Seeing specs as kind of a greeting when I open a terminal is not my thing. But the ASCII art for the logo got me thinking. Some of the logos included in neofetch are quite stylish and colourful. And there is a palette to play with (them colorful boxes in the bottom right).
Could I create something like the logo but with a more polished appearance? Why do people say ASCII art? Don’t we have unicode almost everywhere now? So, shouldn’t there be more symbols to choose from now to make “better” text art?
The net result of my experimentation is fetching.
You can use it to fetch random unicode art. I wanted it to be a bit playful. I want to remind myself that this computer stuff is fun, and to enjoy myself while I’m doing it!
The art is colored based on your terminal color scheme. Here are some examples side-by-side using different themes: the top-left theme is Dracula, the top-right is Solarized, the other two are just me playing around with colors - maybe I’m the first one to make an ultra high contrast Mario! 🤣 I think the output has a different personality depending on your color scheme.
I noticed that neofetch squashes the output if your terminal window is a bit narrow. I was able to make my scripts responsive to the terminal window. ✨
The included scripts were mostly inspired by:
You can run it as a slideshow too if you want with
fetching -s 2 , which shows a new image every 2 seconds!
I think I have just scratched the surface. Unicode has approximately 143,859 unicode characters. These different forms and shapes have the potential for creating very different things.
I mostly used the Block Elements character set (as below). It facilitates creating blocky compositions with a smooth texture. As I practice and try out more characters, I think the output will be better and more variable.
█ ▉ ▊ ▋ ▌ ▍ ▎ ▏▐ ▕ ▇ ▆ ▅ ▄ ▃ ▂ ▁ ■ ▄ ▀ ▬ ▓ ▒ ░
Check out the repo for more in-depth info. You need to have the Bash shell on your system installed to use it. There is an installation script to make it quick and easy to try it out. So, try it out!
There is info on making your own images in there. I outline my “process”. I don’t know how sane or repeatable it is really! I enjoy this type of thing, it may be drudgery to you!
Let me know what you think. 🙂