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 a sucker 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:
Now that we have identified our pre-requisites, let’s get started:
- Download the font archive, and unzip it (usually OS/X does this automatically, if not simply double-click the archive file in your downloads folder). Go to fonts-master/UbuntuMono/ and install each of the four TTFs: simply double-click and let Font Book install them for you.
- Open Terminal, then navigate to Terminal Preferences > Profiles > Font and click the Change button.
- Select Ubuntu Mono derivative Powerline and set the font size to your liking.
- Close preferences, and quit Terminal.
- If you haven’t already done so, install Oh-My-ZSH (using Terminal):
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
- Now let’s configure your ZSH theme settings:
- There we will update our theme. You can find “ZSH_THEME=” toward the top of the file, and set it to:
- Save you changes. (CTRL-X if you’re using Nano, continue editing forever if you’re using Vi or Vim)
- Quit and restart Terminal.
- You should now see your new theme in place.
You can customize your color preferences as desired in Terminal Preferences > Profiles > ANSI Colors.
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!
- Open the Terminal window and position it in the IDE to you liking.
- Open PHPStorm Preferences (CDM + , or PHPStorm > Preferences… menu item).
- Go to Editor > Colors & Fonts > Console Colors; change Console standard output > Foreground to White. Change Console background > Background to Black.
- Go to Editor > Colors & Fonts > Console Font: change Primary Font to Ubuntu Mono Derivative Powerline, Size 16, Line spacing 1.4.
- Click OK to close the preferences window.
- 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.
- If you have similar settings to mine, it should look something like the screenshot below.