diff --git a/README.md b/README.md index 007c3ef..be2a70a 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,10 @@ * `[` and `]`: Split the window vertically and horizontally respectively. * `{` and `}`: Rotate the window up and down respectively. * `=` and `-`: Select an even layout horizontally and vertically respectively. -* `=` and `-`: Select a main layout horizontally and vertically respectively. +* `+` and `_`: Select a main layout horizontally and vertically respectively. +* `<` and `>`: Swap the current window with the first and last window respectively. +* `.` and `,`: Move and swap the current window with the provided window number respectively. +* `$` and `#`: Rename the current session and window with the provided name respectively. * `Space` and `Ctrl-Space`: Move to the previously selected window and pane respectively. * `h`, `j`, `k` and `l`: Move left, down, up and right between panes respectively like the arrow keys. * `` ` ``: Toggle synchronized input between the panes on the current window. diff --git a/tmux.normal.conf b/tmux.normal.conf index f86c61c..5f14b2a 100644 --- a/tmux.normal.conf +++ b/tmux.normal.conf @@ -81,6 +81,16 @@ bind - select-layout even-vertical bind + select-layout main-horizontal bind _ select-layout main-vertical # +# < and > to swap the current window with the first and last windows respectively +bind < swap-window -t '1' +bind > run-shell "tmux swap-window -s $(tmux list-windows | grep -e '(active)$' | sed 's|:.*$||') -t $(tmux list-windows | tail -n 1 | sed 's|:.*$||')" +# +# . and , to move and swap the current window respectively (. is set by default) +bind , command-prompt "swap-window -t '%%'" +# +# $ and # to rename the session and current window respectively ($ is set by default) +bind "#" command-prompt -I '#W' "rename-window '%%'" +# # Space and ctrl-Space to navigating to the previously selected pane and window respectively bind Space last-pane bind C-Space last-window diff --git a/tmux.powerline.conf b/tmux.powerline.conf index 5ee73e2..28eb956 100644 --- a/tmux.powerline.conf +++ b/tmux.powerline.conf @@ -81,6 +81,16 @@ bind - select-layout even-vertical bind + select-layout main-horizontal bind _ select-layout main-vertical # +# < and > to swap the current window with the first and last windows respectively +bind < swap-window -t '1' +bind > run-shell "tmux swap-window -s $(tmux list-windows | grep -e '(active)$' | sed 's|:.*$||') -t $(tmux list-windows | tail -n 1 | sed 's|:.*$||')" +# +# . and , to move and swap the current window respectively (. is set by default) +bind , command-prompt "swap-window -t '%%'" +# +# $ and # to rename the session and current window respectively ($ is set by default) +bind "#" command-prompt -I '#W' "rename-window '%%'" +# # Space and ctrl-Space to navigating to the previously selected pane and window respectively bind Space last-pane bind C-Space last-window