This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/shell/tmux.conf

107 lines
2.6 KiB
Plaintext
Raw Normal View History

2017-02-07 16:16:45 -06:00
# ^s as prefix
unbind C-b
set -g prefix C-s
bind-key s send-prefix
# statusbar on bottom
set-option -g status-position bottom
set-option -g mouse on
2017-02-07 16:16:45 -06:00
# honestly not sure
set -g escape-time 10
setw -g monitor-activity on
bind-key W resize-pane -x 100
# splitting
bind-key v split-window -h
bind-key b split-window
# be xterm
set -g default-terminal "xterm"
# iterating
2017-04-23 06:47:00 -05:00
unbind r
2017-02-07 16:16:45 -06:00
bind r source-file ~/.tmux.conf
2017-04-23 06:47:00 -05:00
# hide tmux status bar by default (prefix H toggles)
set -g status off
# toggle status bar hotkey
2017-02-07 16:16:45 -06:00
bind-key H set status
2017-04-23 06:47:00 -05:00
# message colors
set -g message-bg colour18
set -g message-fg colour7
# status bar configuration
# set -g status-utf8 on
set -g status-justify left
# status bar colors
set -g status-bg colour18
set -g status-fg colour7
# don't show time or date or anything - we have a bar for that
set -g status-left ''
set -g status-right ''
set -g status-right-length 20
set -g status-left ' #(#{DOTFILES_PATH}/scripts/bin/tmux-session-list #S)'
set -g status-left-length 80
setw -g window-status-current-fg colour7
setw -g window-status-current-bg colour1
# setw -g window-status-current-attr bold
setw -g window-status-current-format ''
2017-02-07 16:16:45 -06:00
# vim copying
2017-04-23 06:47:00 -05:00
setw -g mode-keys v
2017-02-07 16:16:45 -06:00
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# 1-based indexing for keystroke simplicity
set -g base-index 1
set -g pane-base-index 1
# custom predefined layouts
bind M-l source-file ~/.tmux/layouts/dev.tmux
# mimic pane switching in and out of vim
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# present a menu of urls to open from the visible pane
bind-key u capture-pane \;\
save-buffer /tmp/tmux-buffer \;\
split-window -l 10 "urlview /tmp/tmux-buffer"
# list of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# highlight with Prefix+[, yank to clipboard with y
2017-02-07 16:16:45 -06:00
set -g @plugin 'tmux-plugins/tmux-yank'
2017-02-07 16:16:45 -06:00
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-sessionist'
# plugin options
# enable continuum
set -g @continuum-restore 'off'
# let continuum startup on boot
set -g @continuum-boot 'on'
# initialize tmux plugin manager
run '~/.tmux/plugins/tpm/tpm'
unbind-key C-p