Reorder windows in tmux
To reorder windows in tmux, you can use following command
1 |
CTRL + B + . |
Press CTRL + B or whatever prefix you use, then press . (dot). This will ask you number/position where you need current window moved.
Another method is
1 |
CTRL + B + : |
This will give you tmux command promt. Now enter
1 |
move-window -t 0 |
This will move current window to position 0. This only work if position 0 is empty. If another window already present in position 0, use swap-window command.
1 |
swap-window -t 0 |
This with swap current window with window in position 0.
Another useful command is
1 |
CTRL + B + , |
This will allow you to rename current tmux window.
Using shortcuts
You can edit .tmux.conf file and add following
1 2 |
bind-key -n C-S-Left swap-window -t -1 bind-key -n C-S-Right swap-window -t +1 |
Now you can use CTRL + SHIFT + LEFT OR RIGHT arrow to move windows.
See tmux