setw -g mode-keys vi unbind C-b # remap prefix to Control + Space set -g prefix C-Space bind C-Space send-prefix # set small delay for each command set -sg escape-time 1 set -g display-panes-time 4000 bind \ split-window -h -c '#{pane_current_path}' bind - split-window -v -c '#{pane_current_path}' bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R bind -r H resize-pane -L 5 bind -r J resize-pane -D 5 bind -r K resize-pane -U 5 bind -r L resize-pane -R 5 bind C-b copy-mode bind-key -Tcopy-mode-vi 'y' send -X copy-selection bind-key -Tcopy-mode-vi 'v' send -X begin-selection bind-key -Tcopy-mode-vi Escape send -X cancel bind-key -Tcopy-mode-vi V send -X rectangle-toggle set -g default-command "reattach-to-user-namespace -l zsh" # Copy the current buffer to system clipboard bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy" # Copy system clipboard to the current buffer and then paste the content bind C-v run "tmux set-buffer $(reattach-to-user-namespace pbpaste); tmux paste-buffer" # Copy selection using a vi-like command; also copy it to system clipboard bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" setw -g monitor-activity on # To prevent some garbage characters from being printed to screen after copying or selecting something # See https://www.reddit.com/r/tmux/comments/2xgrf8/garbage_characters_printed_to_screen_after_a/ set -g set-clipboard off setw -g mouse on # set color of active pane set -g pane-border-fg colour235 set -g pane-border-bg black set -g pane-active-border-fg green set -g pane-active-border-bg black # color status bar set -g status-bg colour235 set -g status-fg white # Status bar set -g status-bg black set -g status-fg white set -g status-interval 10 set -g status-left-length 10hj0 set -g status-left "#[fg=green][#I:#P #W] #(whoami)@#(hostname -s) " set -g status-right "#[fg=colour45]%a %d/%m %H:%M#[fg=default]"