Making a more personal terminal.

Michael Carneal
5 min readFeb 15, 2019

What is the first thing that comes to mind when you think of a computer programmer? Is it the image of a cluttered desk scattered with empty bags of chips and crushed cans of soda? Maybe its a headset wearing hacker in front of three computer monitors, furiously typing away at their keyboard, all the while a mysterious timer counts down to zero. Thanks to big budget Hollywood movies the image of a software engineer can border on mundane to outright science fiction.

Of these farfetched images there is one thing that does remain consistent and accurate. We computer nerds love our terminal. It’s our direct communication to our computers, it takes away all those fancy shinny windows that just seem to get in the way.

If after reading that last comment you are scratching your head and wondering “What the heck is terminal”, then worry not. A terminal is a computer program that provides a text based interface to enter and read commands. More common names for these types of programs are shell, command line, or command prompt. Inside this window we have the power to issue Unix / Shell commands directly to our computer, bypassing that cluttered graphical user interface.

Let’s go ahead and open it up. If you are on a Mac press command + spacebar (* this will open spotlight) , type in terminal, and press enter.

Yikes! , assuming this is your first time opening this program you are most likely thinking two things. First, What the heck is this, and Second, how can this ugly white screen be so powerful. Well, new friend you are right about the ugly part. By default most built in command line applications are a bare bones, no frills, package. But this plain white window has more functionality than meets the eye. It just needs a little bit of a visual overhaul.

If a painter has a canvas and an easel, then a programmer has a computer and a command line. Now, much like a painter, I prefer to put a piece of me into the work I create, and fortunately this plane white window with some black text can be transformed into a very personal and unique workplace.

Above is an image of my own command line, that consist of the following applications.

  • Iterm 2
  • oh my zsh
  • Powerline fonts
  • Powerlevel 9 pluggins
  • Neofetch

Confused?, it’s ok. Iterm 2 is a command line application much like terminal. This feature rich cli supports improved search compatibly, a robust autocompletion, 256 plus color patterns, plugin support for third parry applications, and much much more. For a complete list see the developers feature page here https://www.iterm2.com/features.html.

Feel free to download these packages as we explain them. We can start by downloading Iterm2 by clicking the link above.

oh my zsh is a open source community driven framework for managing zsh. Zsh being an extended Bourne Shell similar to BASH , KSH, and TCH. The oh my zsh community provides a helpful resource to loading your CLI environment with ZSH. In your new Iterm go ahead any input the following commands.

xcode-select —-installruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”brew install zshchsh -s /usr/local/bin/zsh

Close your terminal and re open.

sh -c “$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)”
If done correctly you should see this.

Now we have access to some built in settings. A popular theme that many users find appealing is called agnoster, I prefer Powerlevel9k for its improved powerline fonts.

 git clone https://github.com/powerline/fonts.git
cd fonts
./install.sh
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k

Now open your .zshrc file with vim.

vim .zshrc

Now we are going to edit and add to the following file. *tip press I for insert to edit this document, and when done press :w to save and :q to quit… or :wq for a quick save and exit.

Scroll down to line 8 and remove the # and enter the following.

… and add the following at the top of the page.

POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir rbenv vcs)POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs history time)
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="%f"

Now go to your Iterm settings, and change the font to something powerline related, I prefer source code pro for powerline. Close and reopen you window and you should now have something like this.

Last we have neofetch, which a will grab the running computer information and return it to the console. neofetch is an overhauled version of screen fetch but offeres a little more customization.

brew install neofetch

and then add it your .zshrc

Neofetch is more fun than utility but it gives the user the ability to import their own images and change notice outputs.

Now, if you followed these steps you have the tools needed to make your new terminal as modern or retro as you want. I would recommend browsing developer notes on each to better understand how to configure these packages. Try and recreate mine, or see if you can take it a step further. Feel free to share your design, as there is a large community of users out there who love a clean user interface.

Im a believer in learn by doing, and when stepping outside of your comfort zone you will find that growth comes from the unknown. I would imagine if I’ve have held your attention up until this point you are someone who is at least a little curious in programming. What I recommend to you is to use the above as a nudge to broadening your knowledge of what this mysterious terminal is and how you can make it your own.

link to powerlevel9k — https://github.com/bhilburn/powerlevel9k

link to neofetch — https://github.com/dylanaraps/neofetch

link to oh_my_zsh-https://github.com/robbyrussell/oh-my-zsh

source — https://en.wikipedia.org/wiki/Z_shell

--

--