Permalink
Fetching contributors…
Cannot retrieve contributors at this time
93 lines (67 sloc) 2.27 KB
# -polka-
# Remove the default keybinding
unbind C-b
# Set a new keybinding to C-/. In terminals C-/ is the same as C-_
# however in tmux we can't bind to C-/
set -g prefix C-_
setw -g mode-keys vi
# Act like vim for selecting panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Start at 1 rather than 0
set -g base-index 1
# Set term color properly
set -g default-terminal "screen-256color"
# Neat window titles
set -g set-titles-string "tmux:#I #W"
setw -g window-status-format "#[bg=NONE]#[fg=colour240] #I #[bg=NONE]#[fg=colour240] #W "
setw -g window-status-current-format "#[fg=colour246]#[bg=NONE] #I #[bg=NONE]#[fg=colour246] #W#F "
# Be as large as you can be
setw -g aggressive-resize on
# Set up reload key for tmux
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Colorize the messages in the command
set-option -g message-bg colour235
set-option -g message-fg red
# Sane colors for a light background
set -g status-bg colour8
set -g status-fg colour1
set-window-option -g window-status-current-fg colour15
# hostname color
set -g status-left ' #[fg=colour2]★'
# right status and color
set -g status-right-length 40
set -g status-right '#[fg=colour3]%a %v %l:%M %p | #[fg=colour5]#{battery_percentage} '
# Fix tmux copy bug
set-option -g default-command "reattach-to-user-namespace -l zsh"
# change the escape time in tmux to zero
set-option -sg escape-time 0
set -g status-position top
set -g pane-border-fg colour237
set -g pane-active-border-fg colour237
# show the tmux status bar
set -g status on
# auto rename windows
set -g automatic-rename on
# use old behavior for splits and new windows
unbind '"'
unbind '%'
unbind 'c'
bind-key '"' split-window -c "#{pane_current_path}"
bind-key '%' split-window -h -c "#{pane_current_path}"
bind-key 'c' new-window -c "#{pane_current_path}"
bind-key S run-shell "tmux rename-session $(basename $(pwd))"
# List of plugins
# Supports `github_username/repo` or full git URLs
set -g @tpm_plugins " \
tmux-plugins/tpm \
tmux-plugins/tmux-copycat \
tmux-plugins/tmux-battery-osx \
tmux-plugins/tmux-sessionist \
tmux-plugins/tmux-resurrect \
Morantron/tmux-fingers \
"
# initializes TMUX plugin manager
run-shell ~/.tmux/plugins/tpm/tpm