Most of the work in here was from akracun: https://github.com/akracun/tmux I just added support for window switching and did some refactoring. I'm pretty new to the code base, so let me know if you'd like me to fix anything up.  

This code is in response to http://sourceforge.net/p/tmux/tickets/12/ which I posted (anonymously I guess) some time ago.