This article is outdated. Simply use:

# for `selWin`
bind 1 if-shell 'tmux select-window -t :1' '' 'new-window -t :1'
# for `movePane`
bind M-1 if-shell 'tmux join-pane -d -t 1.1' '' { if-shell 'tmux break-pane -d -t 1' '' 'move-window -t 1' }
# for `rearrange`
set -g renumber-windows on

Tmux scripts

Spending a lot of time in the command line, I am quite a happy tmux user. As much as I love tmux, I find it a bit stiff in handling panes and windows, especially if you compare it to tiled window managers like xmonad. During the years, I wrote some simple scripts to help me in such menial tasks.

The scripts

Here is a brief description of what those scripts do:

How to install them

Download the scripts. I wrote them in Haskell, so you will need to install GHC (or any other Haskell compiler) before running them:

sudo apt-get install ghc
chmod a+x xTmux.hs