First we’ll need to install
Homebrew and Python
I highly recommend checking out homebrew’s wiki page on python, which offers lots of information on the options offered when building python with homebrew.
The guide I followed used the command
brew install python --universal --framework, but didn’t clarify what these extra options did.
I searched around a bit and found this article,
which explains that
--universal builds a “universal (32/64 bit) version.” It also explains that the
--framework option “tells
it to build as a Framework, which has some downstream niceties.” I’m not sure if these options are still valid for
brew install python,
as they weren’t documented on the wiki page. So, I reinstalled without them.
I started following this guide to get Python installed,
but it may be a bit out of date. I’m not very familiar with the Python ecosystem, but
brew install python
seems to install
easy_install as well now. All I needed to do was run the following commands:
And I verified with this:
Then, I configured my environment for
virtualenv, by adding the following to my
.bashrc. Some of these
values will differ for you.
Then, I installed
virtualenvwrapper and tested:
And I verified with this:
virtualenv hit a few snags when running its callback scripts, but my zsh setup shows the name
of the active virtualenv profile and that seemed to be working. I wish I had more time to learn more
about the python ecosystem, but just haven’t had a chance yet. If I’ve made a glaring omission, please
drop me a line in the comments! Thank you!
Installing and Configuring Powerline
Installing powerline ended up being much simpler once I read and understood everything. It’s pretty easy: just
pip install git+git://github.com/Lokaltog/powerline and boom. You’ve got powerline.
Now you need to add some powerline fonts. So, clone this repo and put it in a safe place, like a lockbox. I
added it as a git submodule to my dotfiles. So whenever I’m setting up a new machine and cloning my dotfiles, I
expand the submodules and boom. All the
powerline-fonts are there, then I just start double-clicking away! Or
you can also open the Font Book app, hit ⌘-O, navigate to the powerline-fonts directory, select it and
Finally, you need to set up your zsh to load a new prompt. Powerline includes a base prompt for you. If you’ve
added the above
.bashrc snippet to your zsh profile, you should be able to add
to the end.
Now open a fresh terminal and check out your prompt! It should look something like this.
Now, navigate to a git repository and you can see the branch on the right, like so:
Great! Powerline on OSX!
You should now have both Python and Powerline rarin’ to go. I’ve added a git submodule for my
in dc.files and I’m linking my
~/.config/powerline here. In the
powerline submodule, I’ve set up a custom powerline theme for zsh. My custom theme includes a battery level indicator
that reads out in hearts. As in, hearts like Legend of Zelda. Check it out!
Check the Configuration section of the Powerline docs. Specifically, the References pages, which detail themes, colorschemes and how to tweak each option! Great stuff - make your prompts splash.
Also check out the plugins on the Usage page to see
how to configure
tmux with a status bar. Take a look at this protip to make your
tmux status bar responsive. For
emacs, check out emacs-powerline
and powerline.el, which may be available on MELPA.
Richard Guay does a great job of explaining Powerline customizations for vim/macvim, fish, and zsh. His blog includes tons of screenshots. Great resource!