# fix colors set -g default-terminal "screen-256color" # Arrow movement: nice bind -n S-down new-window bind -n S-left prev bind -n S-right next bind -n C-S-left swap-pane -U bind -n C-S-right swap-pane -D bind -r [ swap-window -t -1 bind -r ] swap-window -t +1 bind r source-file ~/.tmux.conf \; display-message " Config reloaded." bind R source-file ~/.tmux.conf \; display-message " Config reloaded." # All sutff for a status bar set-option -g status on set-option -g status-interval 2 set-option -g status-utf8 on set-option -g status-justify "centre" set-option -g status-left-length 60 set-option -g status-right-length 90 set -g status-bg black set -g status-fg white set -g status-left "#H: #T" set -g status-right "%H:%M %d-%h-%Y" set -g window-status-format "#I:#W" set -g window-status-current-format "|#I:#W|" set -g status-interval 1 set -g status-justify left # align window list # default statusbar colors set -g status-fg white set -g status-bg default # default window title colors set-window-option -g window-status-fg black set-window-option -g window-status-bg default set-window-option -g window-status-attr dim # active window title colors set-window-option -g window-status-current-fg white set-window-option -g window-status-current-bg default set-window-option -g window-status-current-attr bold # command/message line colors set -g message-fg white set -g message-bg black set -g message-attr bright # Fix window size on new connections set -g aggressive-resize on # resize unbind Left unbind Right unbind Down unbind Up bind -r Left resize-pane -L 2 bind -r Right resize-pane -R 2 bind -r Down resize-pane -D 2 bind -r Up resize-pane -U 2 # Toggle mouse on with ^B m # Useful for cut/paste interop bind m \ set -g mouse-resize-pane on \;\ set -g mouse-select-pane on \;\ set -g mouse-select-window on \;\ set -g mode-mouse on \;\ display 'Mouse: ON' bind C-v paste-buffer # Toggle mouse off with ^B M bind M \ set -g mouse-resize-pane off \;\ set -g mouse-select-pane off \;\ set -g mouse-select-window off \;\ set -g mode-mouse off \;\ display 'Mouse: OFF' set-window-option -g mode-keys vi unbind T unbind N bind -r T clock-mode bind -r N next-window # Dvorak vs qwerty vi keys unbind h unbind t unbind d unbind n bind -r h select-pane -U bind -r t select-pane -D bind -r d select-pane -L bind -r n select-pane -R # I use ^b^A to switch panes quickly unbind ^A bind ^A select-pane -t :.+ bind ^O select-pane -t :.- # Fix scrolling? #set -g terminal-overrides 'xterm*:smcup@:rmcup@' set -g history-limit 10000 # Clear terminal scrollback on ^k bind -n C-k send-keys -R \; clear-history\; send-keys C-m # Easy splits bind-key | split-window -h bind-key \ split-window -h bind-key - split-window -v bind-key k kill-pane bind-key K kill-window #set-option -g default-command "reattach-to-user-namespace -l zsh" ##CLIPBOARD selection integration ##Requires prefix key before the command key #Copy tmux paste buffer to CLIPBOARD #bind C-c run "tmux show-buffer | pbcopy" #Copy CLIPBOARD to tmux paste buffer and paste tmux paste buffer #bind C-v run "tmux set-buffer -- \"$(pbpaste)\"; tmux paste-buffer" # Nested tmux support bind-key b send-prefix # Multiple server support bind s set -g synchronize-panes bind-key -t vi-copy 'v' begin-selection bind-key -t vi-copy 'y' copy-selection bind-key -t vi-copy 'd' cursor-left bind-key -t vi-copy 'h' cursor-down bind-key -t vi-copy 't' cursor-up bind-key -t vi-copy 'n' cursor-right bind-key -t vi-copy 'l' search-again # Move panes between windows bind -r < join-pane -t -1.0 bind -r > join-pane -t +1.0 # Reminder: ^b ! breaks panes out