Permalink
Branch: master
Find file Copy path
a254aa6 Feb 15, 2019
1 contributor

Users who have contributed to this file

121 lines (91 sloc) 2.96 KB
set -g default-command /usr/bin/zsh
# act like vim
setw -g mode-keys vi
setw -g automatic-rename off
# window numbering starts at 1
set -g base-index 1
set-window-option -g pane-base-index 1
set -g window-status-format '#I:#(pwd="#{pane_current_path}"; echo ${pwd####*/})#F'
set -g window-status-current-format '#I:#(pwd="#{pane_current_path}"; echo ${pwd####*/})#F'
set -g status-interval 1
# set -g mode-mouse on
# setw -g mouse-select-window on
# setw -g mouse-select-pane on
# move around panes with j and k, a bit like vim
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize panes like vim
bind < resize-pane -L 10
bind > resize-pane -R 10
bind - resize-pane -D 10
bind + resize-pane -U 10
# act like GNU screen
unbind C-b
set -g prefix C-a
# activity monitoring
setw -g monitor-activity on
set -g visual-activity on
# split windows like vim
bind s split-window -v
bind v split-window -h
bind y set-window-option synchronize-panes
# bind : to command-prompt like vim
# this is the default in tmux already
bind : command-prompt
# look good
# set -g default-terminal "screen-256color"
set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
# resize windows to smallest client only when active
setw -g aggressive-resize on
# no time between C-a and command
set -s escape-time 0
# send command to nested tmux with C-a a
bind-key a send-prefix
# last window with C-a C-a
bind-key C-a last-window
# cursors for windows
bind Left previous-window
bind b previous-window
bind Right next-window
# move windows
bind S-Left swap-window -t -1
bind S-Right swap-window -t +1
# Copy and paste a bit like vim
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel pbcopy
bind-key -Tcopy-mode-vi Escape send -X cancel
bind-key -Tcopy-mode-vi V send -X rectangle-toggle
# needed for ruby motion
#set-option -g default-command "login-shell"
#### COLOUR (Solarized dark)
# default statusbar colors
set-option -g status-bg black #base02
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 brightred #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
set -g history-limit 10000