# Remap prefix to alt q set-option -g prefix M-q unbind C-b bind -N 'Send Prefix to pane' M-q send-prefix # Window keytable unbind 0 unbind 1 unbind 2 unbind 3 unbind 4 unbind 5 unbind 6 unbind 7 unbind 8 unbind 9 unbind n unbind p unbind up unbind down unbind left unbind right unbind ! unbind '"' unbind $ unbind % unbind & unbind , unbind c unbind x unbind d unbind "'" bind -T root -N 'Switch to Window KT' M-w switch-client -T window bind -T window -N 'Send Window keystroke' M-w send-keys bind -T window -N 'Switch to Window 1' 1 select-window -t :=1 bind -T window -N 'Switch to Window 2' 2 select-window -t :=2 bind -T window -N 'Switch to Window 3' 3 select-window -t :=3 bind -T window -N 'Switch to Window 4' 4 select-window -t :=4 bind -T window -N 'Switch to Window 5' 5 select-window -t :=5 bind -T window -N 'Switch to Window 6' 6 select-window -t :=6 bind -T window -N 'Switch to Window 7' 7 select-window -t :=7 bind -T window -N 'Switch to Window 8' 8 select-window -t :=8 bind -T window -N 'Switch to Window 9' 9 select-window -t :=9 bind -T window -N 'Switch to Window 10' 0 select-window -t :=10 bind -T window -N 'Input Window to switch' \# command-prompt -T window-target -p 'Window to switch:' { select-window -t ":%%" } bind -T window -N 'Switch to previous Window' [ previous-window bind -T window -N 'Switch to following Window' ] next-window bind -T window -N 'Focus Pane above' Up select-pane -U bind -T window -N 'Focus Pane below' Down select-pane -D bind -T window -N 'Focus Pane to left' Left if -F #{pane-at-left} previous-window 'select-pane -L' bind -T window -N 'Focus Pane to right' Right select-pane -R bind -T window -N 'Create new window' w new-window -a bind -T window -N 'Move pane to new window' W break-pane bind -T window -N 'Rename current window' r command-prompt -I "#W" { rename-window "%%" } bind -T window -N 'Rename current session' M-R command-prompt -I "#S" { rename-session "%%" } bind -T window -N 'Close current window' k confirm-before -p "Kill window #W? (y/n)" kill-window bind -T window -N 'Close current pane' K confirm-before -p "Kill pane #P? (y/n)" kill-pane bind -T window -N 'Close current client' M-k detach-client bind -T window -N 'Break pane horizontally' b split-window -h bind -T window -N 'Break pane vertically' B split-window # Force pass keytable set -g command-alias[174] force-pass='switch-client -T force-pass ; display "Forcing Keystroke..."' bind -T root -N 'Send keystroke to pane' M-f force-pass bind -N 'Send keystroke to pane' M-f force-pass bind -T window -N 'Send keystroke to pane' M-f force-pass bind -T force-pass -N 'Keystroke to send' any send-keys # Statusbar Shenanigans set -g status 2 set -g status-format[0] '#[align=centre list=on]#[list=left-marker]<- #[list=on]#{W:#[range=window]#{?window_start_flag,,| }#{?window_active,>,#{?window_bell_flag,!,}}#I:#W#{?#{!=:#{window_panes},1},+#{e|-:#{window_panes},1},}#{?window_active,<,#{?window_bell_flag,!,}} }#[norange list=right-marker] ->#[nolist default]' set -g status-format[1] '#[align=centre]KT:#{client_key_table} #{client_user}@#H %H:%M %d-%b-%Y#{?#{==#(from|wc -l),1}, M#{e|-:#(from|wc -l),1},}' # Miscellaneous unbind ] unbind [ bind -N 'Paste contents of buffer' C-v paste-buffer -p bind -N 'Enter Copy Mode' C-c copy-mode bind -N 'List buffers to paste' C-V choose-buffer -Z unbind -T root M-Up unbind -T root M-Down #bind -T root -N 'Move internal monitor up' M-Up refresh-client -U 10 #bind -T root -N 'Move internal monitor down' M-Down refresh-client -U 10 bind -N 'Reload tmux source file' r display '#[align=centre]reloading...' \; source-file ~/.tmux.conf set-option -g editor /usr/bin/nano set-option -g prefix-timeout 2000 set-option -g base-index 1 set-option -g mouse on set-option -g renumber-windows on set-option -g set-titles on set-option -g set-titles-string '#W @ #T (tmux) #{session_alerts}' set-option -g status-right 'KT:#{client_key_table} HOST:#{pane_title} TIME:%H:%M %d-%b-%Y' set-option -g visual-bell both set-option -g clock-mode-colour '#80ff80' set-option -g pane-border-indicators both