I’ve always wanted to get that fancy Powerline status bar and prompt. Chevrons and git branch icons in the terminal just sounds so… defying:

Powerline screenshot

I’d failed to get it working properly before because of a combination of outdated Powerline docs and confusion between OS X’s system python/vim and homebrew’s python/vim. Some of my former colleagues detailed the pains and hours lost getting Powerline setup, so I gave up.

Anyway, I got a new Mac for work recently and decided to try again, and it was easier than I thought. You (including you, future Chu Yeow) can use this guide if you’re using homebrew to install vim and python (and everything else like zsh and tmux).

Installing Powerline on OS X

  1. Install python with homebrew: brew install python
  2. Install vim with homebrew: brew install vim --env-std --override-system-vim. You must install vim after python so that it’ll compile with homebrew’s python.
  3. Install powerline with pip: pip install https://github.com/Lokaltog/powerline/tarball/develop. Powerline should get installed to /usr/local/lib/python2.7/site-packages/powerline.
  4. open /usr/local/lib/python2.7/site-packages/powerline – you should see the files required for integration with zsh, vim, tmux, etc. in the bindings directory. All you need to do now is to include these bindings in your zsh, vim and tmux config files – it’s that simple!
  5. Add Powerline to vim by adding these lines to ~/.vimrc:
    source /usr/local/lib/python2.7/site-packages/powerline/bindings/vim/plugin/powerline.vim
    set laststatus=2
  6. Add Powerline to tmux by adding this to ~/.tmux.conf:
    source /usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf
  7. Add Powerline to zsh by adding this to ~/.zshrc:
    source /usr/local/lib/python2.7/site-packages/powerline/bindings/zsh/powerline.zsh

    If you use oh-my-zsh, be sure to source the Powerline bindings after oh-my-zsh’s.

  8. Grab a patched font from https://github.com/Lokaltog/powerline-fonts (I use Inconsolata), and install it (just download, double-click the font file, and Install). If you don’t use any of these fonts, you’ll have to patch your favorite font yourself (have fun with that!)

That’s all you need! Go crazy and start tweaking your Powerline colorscheme.

Some of you might know that I’m a rabid anime fan. I don’t talk much about it on this blog (actually, I don’t talk much on this blog anymore, seeing as I haven’t blogged this year). Anyway, yeah, one of my biggest passions and failings is my love for anime and I can’t stop myself from collecting those cute Nendoroids too.

This summer 2011 season, I’m watching 4 new series and 2 older series that started in spring 2011, Hanasaku Iroha and Nichijou:

Currently watching anime, Summer 2011

Top row: Usagi Drop, Mawaru Penguindrum, Ikoku Meiro no Croisée.
Bottom row: No.6, Hanasaku Iroha, Nichijou.

I’m a sucker for the slice of life genre (5 out of 6 series above are “slice of life”). Usagi Drop in particular is very promising – looking forward to how Daikichi and Rin’s story unfolds. Mawaru Penguindrum is probably the winner in terms of “interestingness” though – after all, it has penguins. After the brilliant Ano Hana from spring 2011, Usagi Drop is looking to be my mainstay for this season.

If you’re an anime fan, please leave a comment on what you’re watching or ping me on twitter (I’m @chuyeow) – I’d love to know what you guys like to watch when you’re not coding.

In an effort to streamline Firefox’s UI, the latest Firefox nightly builds have moved the Stop/Refresh button into the right corner of the Location Bar. I like this move even if the Firefox developers are simply copying design ideas from other browsers (in this case, I believe Safari was first).

When you’re typing in the Location Bar, a green Go button is shown:

That switches to a red Stop button when the page is loading:

The thin line you see in the location bar is a progress indicator that indicates how much of the current web page has loaded – I don’t like the way it looks and I think it’ll probably change in future.

When the page has fully loaded, it changes to a Refresh button:

This leaves a minimalist and compact toolbar:

I should actually remove the Home button – I don’t ever use it.

To try out the new stuff coming in Firefox, download a Firefox nightly build now.

Jeena emailed me recently about his Rails plugin, plistifier, that allows you to render plists (property lists).

It allows you to render your ActiveRecord objects as plists (among other things):

def show
  @post = Post.find(params[:id])

  respond_to do |format|
    format.xml   { render :xml => @post }
    format.plist { render :plist => @post }
  end
end

Jeena was kind enough to let me know he “stole” my old Jsonifier plugin (github) code in plistifier.

For those of you who use the excellent Railscasts TextMate theme and want to replicate the theme in Xcode, you can grab my version from Github. This is what it looks like:

Railscasts Xcode theme

Save it into ~/Library/Application Support/Xcode/Color Themes/, restart Xcode, and open its Preferences. You will be able to pick the Railscasts Color Theme in the Fonts & Colors tab.

I dug this theme up after realizing that I haven’t actually saved the Railscasts theme I’d replicated from several months ago and was too lazy to set up another one in my other Mac.

Koen Van Der Auwera did a similar theme too so if you find that mine doesn’t work so well (I’ve only used it for Cocoa Touch development, not at all for developing Mac apps), scoot over to his blog post.