snips/user.tmux.conf

65 lines
2.0 KiB
Plaintext

#
# TMUX Configuration file
#
# General settings {{{
set -g default-terminal "xterm-256color"
set -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
set -as terminal-overrides ',*:U8=a0'
set -g mouse on
set -g status-position top
# set -g status-windows-justify middle
# Package management {{{
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'jimeh/tmux-themepack'
set -g @themepack 'powerline/default/gray'
set -g @themepack-status-right-area-left-format "#(~/bin/tmux_status)  %H:%M"
# }}}
# }}}
# Keyboard shortcuts {{{
# Navigation
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Clipboard integration
# ctrl+c to send to clipboard
# Selection with mouse should copy to clipboard right away, in addition to the default action.
unbind -n -Tcopy-mode-vi MouseDragEnd1Pane
bind -Tcopy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel\; run "tmux save-buffer - | xclip -i -sel clipboard > /dev/null"
# Middle click to paste from the clipboard
unbind-key MouseDown2Pane
bind-key -n MouseDown2Pane run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
# }}}
# Footer {{{
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
if "test -d ~/.tmux/plugins/tpm" \
"run -b '~/.tmux/plugins/tpm/tpm'"
# }}}
# vim: foldenable foldmethod=marker