2019-08-17 03:11:59 +00:00
|
|
|
#
|
|
|
|
# TMUX Configuration file
|
|
|
|
#
|
|
|
|
# General settings {{{
|
2023-08-27 02:19:05 +00:00
|
|
|
# set -g default-terminal "xterm-256color"
|
|
|
|
set -g default-terminal "screen-256color"
|
|
|
|
set -g default-command "$SHELL -l"
|
2019-11-10 21:05:25 +00:00
|
|
|
set -g prefix C-a
|
|
|
|
unbind-key C-b
|
|
|
|
bind-key C-a send-prefix
|
2019-08-17 03:11:59 +00:00
|
|
|
|
2023-08-27 02:19:05 +00:00
|
|
|
# vi mode
|
|
|
|
set-window-option -g mode-keys vi
|
|
|
|
set -as terminal-overrides ",*:U8=a0"
|
|
|
|
# set-option -ga terminal-overrides ",screen-256color:Tc"
|
2019-11-14 04:57:09 +00:00
|
|
|
|
2019-11-10 21:05:25 +00:00
|
|
|
set -g mouse on
|
|
|
|
set -g status-position top
|
|
|
|
# set -g status-windows-justify middle
|
|
|
|
|
2019-08-17 03:11:59 +00:00
|
|
|
# Package management {{{
|
2019-11-10 21:05:25 +00:00
|
|
|
# List of plugins
|
|
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
|
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
2019-08-17 03:11:59 +00:00
|
|
|
|
2019-11-10 21:05:25 +00:00
|
|
|
# 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'
|
|
|
|
|
2023-08-27 02:19:05 +00:00
|
|
|
set -g @themepack-status-right-area-left-format "#(~/bin/tmux_status) %H:%M"
|
|
|
|
|
2019-11-10 21:05:25 +00:00
|
|
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
|
|
|
set -g @plugin 'jimeh/tmux-themepack'
|
|
|
|
set -g @themepack 'powerline/default/gray'
|
|
|
|
# }}}
|
|
|
|
# }}}
|
2019-08-17 03:11:59 +00:00
|
|
|
|
2019-11-10 21:05:25 +00:00
|
|
|
# Keyboard shortcuts {{{
|
2023-08-27 02:19:05 +00:00
|
|
|
# Reload tmux config
|
|
|
|
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
|
|
|
|
|
2019-11-10 21:05:25 +00:00
|
|
|
# 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
|
2020-09-07 02:22:55 +00:00
|
|
|
bind h select-pane -L
|
|
|
|
bind j select-pane -D
|
|
|
|
bind k select-pane -U
|
|
|
|
bind l select-pane -R
|
2019-12-26 21:59:23 +00:00
|
|
|
|
2023-08-27 03:43:35 +00:00
|
|
|
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
|
|
|
|
|
|
|
|
# # Clipboard integration
|
|
|
|
# # ctrl+c to send to clipboard
|
2019-12-26 21:59:23 +00:00
|
|
|
|
2023-08-27 02:19:05 +00:00
|
|
|
# # Selection with mouse should copy to clipboard right away, in addition to the default action.
|
|
|
|
# unbind -n -T copy-mode-vi MouseDragEnd1Pane
|
|
|
|
# bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel\; run "tmux save-buffer - | xclip -i -sel clipboard > /dev/null"
|
|
|
|
|
|
|
|
# unbind -n -T copy-mode-vi 'v'
|
|
|
|
# bind -T copy-mode-vi 'v' send -X begin-selection
|
|
|
|
# unbind -n -T copy-mode-vi 'y'
|
|
|
|
# bind -T copy-mode-vi 'y' send -X copy-selection-and-cancel\; run "tmux save-buffer - | xclip -i -sel clipboard > /dev/null"
|
2019-12-26 21:59:23 +00:00
|
|
|
|
2023-08-27 02:19:05 +00:00
|
|
|
# # 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"
|
2019-08-17 03:11:59 +00:00
|
|
|
# }}}
|
|
|
|
|
|
|
|
# Footer {{{
|
2019-11-10 21:05:25 +00:00
|
|
|
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
2019-11-18 15:31:43 +00:00
|
|
|
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'"
|
2019-08-17 03:11:59 +00:00
|
|
|
# }}}
|
|
|
|
# vim: foldenable foldmethod=marker
|