## Behavior ############### # set correct Term # set-option -g default-terminal "screen-256color" # Zero-based indexing is fine in programming languages, but not so much in # a multiplexer when zero is on the other side of the keyboard. set -g base-index 1 set -g renumber-windows on setw -g automatic-rename on # Remove the delay set -s escape-time 0 # Rather than constraining window size to the maximum size of any client # connected to the *session*, constrain window size to the maximum size of any # client connected to *that window*. Much more reasonable. setw -g aggressive-resize off # go zsh, go set-option -g default-shell $SHELL # a mouse set -g mode-mouse on setw -g mouse-select-window on setw -g mouse-select-pane on set-option -g default-command "reattach-to-user-namespace -l zsh" ## Key bindings ########### # Remap the key prefix set -g prefix C-a unbind C-b # Restore go-to-start-of-line shortcut bind a send-prefix # Go to last active window bind-key C-a last-window # reload config without killing server bind R source-file ~/.tmux.conf \; display-message " Config reloaded..". # Better splitting keybinds unbind % bind H split-window -v unbind '"' bind V split-window -h # set vi keys setw -g mode-keys vi 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-pipe "reattach-to-user-namespace pbcopy" unbind -t vi-copy Enter bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R bind-key -r C-h select-window -t :- bind-key -r C-l select-window -t :+ # after copying to a tmux buffer, hit y again to copy to clipboard bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy" # quick view of processes bind '~' split-window "exec top" # Cycling through windows bind-key -n C-right next bind-key -n C-left prev ## Looks ######################## # default statusbar colors set-option -g status-bg '#333333' set-option -g status-fg yellow #yellow set-option -g status-attr default # default window title colors set-window-option -g window-status-fg brightblue #base0 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 #orange set-window-option -g window-status-current-bg default set-window-option -g window-status-current-attr bright # pane border set-option -g pane-border-fg black #base02 set-option -g pane-active-border-fg brightgreen #base01 # message text set-option -g message-bg black #base02 set-option -g message-fg brightred #orange # pane number display set-option -g display-panes-active-colour blue #blue set-option -g display-panes-colour brightred #orange # clock set-window-option -g clock-mode-colour green #green ## Status bar ################### set-option -g status-justify left set-option -g status-right-length 60 set-option -g status-left-length 60 set-option -g status-left '#[bg=blue] #[fg=white]#[bold]#S #[default]' set-option -g status-right '#[bg=#383838] #(whoami)@#H'