Agnoster Terminal Theme on OS X

The Agnoster ZSH theme is getting a lot of wind in its sails these days, and Mirza Pasic’s recent blog post in this topic sparked my interest. I’m always eager to try new things to aid my development workflow.

While his article outlines the how-to for Ubuntu, I’ll constrain myself to OS X, in my case Yosemite. We’ll end up with something similar to this:

Prerequisites

Installation

Now that we have identified our pre-requisites, let’s get started:

  1. Download the font archive, and unzip it. Go to fonts-master/UbuntuMono/ and install each of the four TTFs: simply double-click and let Font Book install them for you.
  2. Open Terminal, then navigate to Terminal Preferences > Profiles > Font and click the Change button.
  3. Select Ubuntu Mono derivative Powerline and set the font size to your liking.
  4. Close preferences, and quit Terminal.
  5. If you haven’t already done so, install Oh-My-ZSH.
  6. Now let’s configure your ZSH theme settings:
  7. There we will update our theme. You can find “ZSH_THEME=” toward the top of the file.
  8. Save you changes (CTRL-X if you’re using Nano, continue editing forever if you’re using Vi or Vim).
  9. Quit and restart Terminal.
  10. You should now see your new theme in place.

Bonus

Custom Colors

You can customize your color preferences as desired in Terminal Preferences > Profiles > ANSI Colors.

Agnoster in PHPStorm Terminal

So now that we have the OS/X Terminal configured, you’re thinking that’s all well and good, but doesn’t really help if you’re using PHPStorm’s integrated Terminal window. Actually, now that you look at it, it only seems to have made things worse. Never fear, the fix for that is here!

  1. Open the Terminal window and position it in the IDE to you liking.
  2. Open PHPStorm Preferences (CDM-, or PHPStorm > Preferences … menu item).
  3. Go to Editor > Colors & Fonts > Console Colors. Change Console standard output > Foreground to White. Change Console background > Background to Black.
  4. Go to Editor > Colors & Fonts > Console Font. Change Primary Font to Ubuntu Mono Derivative Powerline, Size 16, Line spacing 1.4.
  5. Click OK to close the preferences window.
  6. Click the red X in the Terminal frame to kill the current terminal, then click on the Terminal tab again to open a fresh terminal window with the new settings.
  7. If you have similar settings to mine, it should look something like the screenshot below.

Feedback

Would love to hear your feedback — share your thoughts, problems, or improvements in the comments.