diff --git a/.devcontainer/tmux.conf b/.devcontainer/tmux.conf index bca5cb1..f616f72 100644 --- a/.devcontainer/tmux.conf +++ b/.devcontainer/tmux.conf @@ -1,4 +1,5 @@ set -g default-terminal "screen-256color" + #---------------------------- # Key bindings #---------------------------- @@ -19,7 +20,19 @@ bind -n S-down new-window bind -n S-left prev bind -n S-right next # quick view of processes -bind '~' split-window "exec htop" +bind '~' split-window "exec top" + +#---------------------------- +# Window moving / reordering +#---------------------------- +# Shift+Up: prompt for a target index and swap the current window there. +# Focus follows the window to its new slot (no -d). +bind -n S-up command-prompt -p "move window to:" "swap-window -t '%%'" +# Renumber all windows sequentially to close gaps left by closed windows. +bind R move-window -r +# Automatically insert windows in the gaps when we create new ones +set-option -g renumber-windows on + #-------------------------- # Statusbar #-------------------------- @@ -36,6 +49,7 @@ set-window-option -g window-status-style fg=white,bg=default,dim set-window-option -g window-status-current-style fg=white,bg=default,bright # command/message line colors set -g message-style fg=white,bg=black,bright + #---------------------------- # Miscellaneous #----------------------------