oxidane/tmuxomatic — pull request #8 by madlep (2014-08-18 23:10:23+00:00)
Title: Fix `session not found` error at startup when `base-index` is set

TL;DR - use window name to set focus rather than window index

In my ~/.tmux.conf I have `set -g base-index 1` so window numbers are 1-offset instead of 0-offset (this makes switching to a window easier using the number row on the keyboard).

However, tmuxomatic was displaying `session not found` error when starting up with this tmux config option set.

The problem is that tmuxomatic assumed that windows were 0-offset, and trying to go to the window index based on that.

So use the window name to focus the window instead of the index