# Bind prefix to C-a unbind C-b set -g prefix C-b # rebind prefix to using remote C-b (default) as single press, local C-a bind C-R unbind C-b \; set -g prefix C-a \; display "Rebind to remote C-b; local C-a" # clear and unbind bind C-C unbind C-a \; set -g prefix C-b \; display "Rebind local C-a to C-b" # Change send command delay set -sg escape-time 10 # Let windows and panes index start at 1 set -g base-index 1 setw -g pane-base-index 1 #j Bind r to reload config file bind r source-file ~/.tmux.conf \; display "Config file reloaded" # Allow send C-b by pressing it twice bind C-b send-prefix # Bind spliting panes by | and - bind | split-window -h bind - split-window -v # Bind moving from pane to pane by hjkl bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R # Bind h and l to moving from window to window bind -r C-h select-window -t :- bind -r C-l select-window -t :+ # Bind HJKL to resize panes 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 # Disable mouse entirely setw -g mode-mouse off # Enable pbcopy and pbpaste support in OSX # # Futher information: # https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/blob/master/README.md # http://robots.thoughtbot.com/post/19398560514/how-to-copy-and-paste-with-tmux-on-mac-os-x set -g default-command "reattach-to-user-namespace -l fish" # Bind c/v to copy/paste from tmux to system buffer #bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy" #bind C-v run "tmux set-buffer $(reattach-to-user-namespace pbpaste); tmux paste-buffer" # Enable vi keys to move around buffer setw -g mode-keys vi # Setup 'v' to begin selection as in Vim bind-key -t vi-copy v begin-selection bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" # Update default binding of `Enter` to also use copy-pipe unbind -t vi-copy Enter bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" # Bind copy-paste to # C-esc: enter copy mode # v: activate highlighting # y: capture # q: exit copy mode # C-a p: paste #unbind [ #bind Escape copy-mode #unbind p #bind p paste-buffer #bind-key -t vi-copy 'v' begin-selection #bind-key -t vi-copy 'y' copy-selection # Use 256 colors for proper displaying of Vim colorschemes set -g default-terminal "screen-256color" # Enable utf-8 setw -g utf8 on set -g status-utf8 on set status-interval 1 #set-option -g status-right " #(~/.battery_percent) :: _utc#(ruby -e \"puts Time.now.utc.to_s[11..12]\") #(date '+%H:%M') " set-option -g status-right "#(~/.right_text_snitch)" set-option -g status-right-length 100 # --- colors (solarized dark) # default statusbar colors set -g status-bg black set -g status-fg colour12 set -g status-attr default # default window title colors setw -g window-status-fg brightblue setw -g window-status-bg default # active window title colors setw -g window-status-current-fg yellow setw -g window-status-current-bg default setw -g window-status-current-attr dim # pane border set -g pane-border-fg black set -g pane-border-bg default set -g pane-active-border-fg yellow set -g pane-active-border-bg default # command line/message text set -g message-bg black set -g message-fg yellow # pane number display set -g display-panes-active-colour yellow set -g display-panes-colour brightblue # clock setw -g clock-mode-colour yellow # --- end colors # # utf8 support set-window-option -g utf8 on