2016-10-30 21:21:51 +00:00
|
|
|
#####################
|
|
|
|
# KEYBINDINGS #
|
|
|
|
#####################
|
|
|
|
# remap prefix from Ctrl+B to Ctrl+A
|
2016-10-29 05:09:40 +00:00
|
|
|
unbind C-b
|
|
|
|
set -g prefix C-a
|
|
|
|
bind C-a send-prefix
|
|
|
|
|
2016-10-30 21:21:51 +00:00
|
|
|
# reload config file
|
2016-11-13 01:56:02 +00:00
|
|
|
bind r source-file ~/.config/tmux/tmux.conf \; display-message " ✱ tmux.conf is reloaded"
|
2016-10-29 05:09:40 +00:00
|
|
|
|
2016-10-30 21:21:51 +00:00
|
|
|
#####################
|
|
|
|
# BEHAVIOUR #
|
|
|
|
#####################
|
|
|
|
set -g allow-rename off # stop renaming windows automatically
|
|
|
|
set -g base-index 1 # start window numbering at 1
|
|
|
|
set -g pane-base-index 1 # keep pane numbering consistent with windows
|
|
|
|
set -g renumber-windows on # renumber windows when window closed
|
|
|
|
set -g mouse on # enable mouse mode
|
2016-10-29 05:09:40 +00:00
|
|
|
|
2016-10-30 21:21:51 +00:00
|
|
|
#####################
|
|
|
|
# VISUAL CHANGES #
|
|
|
|
#####################
|
|
|
|
# general
|
|
|
|
set -g status-position top # status bar at top
|
|
|
|
set -g status-fg colour6 # default foreground colour
|
|
|
|
set -g status-bg black # default background colour
|
|
|
|
set -g window-status-separator ' ' # status separator - space
|
|
|
|
set -g status-left "" # left status bar not used
|
2016-10-29 05:09:40 +00:00
|
|
|
|
2016-11-13 01:56:02 +00:00
|
|
|
# right status bar - prefix/copy status - iso8601 date + time
|
|
|
|
set -g status-right "#{prefix_highlight} #[fg=black,bg=colour6] %y-%m-%d #[bg=black] #[fg=black,bg=colour4] %H:%M "
|
2016-10-29 05:09:40 +00:00
|
|
|
|
2016-10-30 21:21:51 +00:00
|
|
|
# current window
|
|
|
|
set -g window-status-current-format "#[fg=black,bg=colour4] #I #[fg=colour4,bg=colour240,bold] #W "
|
|
|
|
|
|
|
|
# standard window
|
|
|
|
set -g window-status-format "#[fg=colour6,bg=colour238] #I #[fg=colour6,bg=colour238] #W "
|
|
|
|
|
|
|
|
# panes
|
|
|
|
set -g pane-active-border-fg colour4 # border foreground colour of active pane
|
|
|
|
set -g pane-active-border-bg colour236 # border background colour of active pane
|
|
|
|
set -g pane-border-fg colour238 # border foreground colour of inactive pane(s)
|
|
|
|
set -g pane-border-bg colour236 # border background colour of inactive pane(s)
|
|
|
|
|
|
|
|
# messages
|
|
|
|
set -g message-fg black # foreground colour of messages
|
|
|
|
set -g message-bg colour5 # background colour of messages
|
|
|
|
|
2016-11-13 01:56:02 +00:00
|
|
|
# prefix highlight
|
|
|
|
set -g @prefix_highlight_fg black # highlight foreground
|
|
|
|
set -g @prefix_highlight_bg colour5 # highlight background
|
|
|
|
set -g @prefix_highlight_show_copy_mode on # show when in copy-mode
|
|
|
|
set -g @prefix_highlight_copy_mode_attr fg=black,bg=yellow # copy-mode bg/fg
|
|
|
|
|
2016-10-30 21:21:51 +00:00
|
|
|
#####################
|
|
|
|
#TMUX PLUGIN MANAGER#
|
|
|
|
#####################
|
|
|
|
# conform to XDG base directory specification
|
2016-10-29 05:09:40 +00:00
|
|
|
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.config/tmux/plugins'
|
|
|
|
|
2016-10-30 21:21:51 +00:00
|
|
|
# list of plugins
|
2016-11-13 01:56:02 +00:00
|
|
|
set -g @tpm_plugins ' \
|
|
|
|
tmux-plugins/tpm \
|
|
|
|
tmux-plugins/tmux-yank \
|
2016-11-21 20:47:18 +00:00
|
|
|
tmux-plugins/tmux-urlview \
|
2016-11-13 01:56:02 +00:00
|
|
|
tmux-plugins/tmux-sensible \
|
|
|
|
tmux-plugins/tmux-pain-control \
|
|
|
|
tmux-plugins/tmux-prefix-highlight \
|
2016-10-29 05:09:40 +00:00
|
|
|
'
|
|
|
|
|
2016-10-30 21:21:51 +00:00
|
|
|
# other examples:
|
2016-10-29 05:09:40 +00:00
|
|
|
# set -g @plugin 'github_username/plugin_name'
|
|
|
|
# set -g @plugin 'git@github.com/user/plugin'
|
|
|
|
# set -g @plugin 'git@bitbucket.com/user/plugin'
|
|
|
|
|
2016-10-30 21:21:51 +00:00
|
|
|
# install TPM if not already installed
|
2016-10-29 05:09:40 +00:00
|
|
|
if "test ! -d ~/.config/tmux/plugins/tpm" \
|
2016-10-30 21:21:51 +00:00
|
|
|
"run 'git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm'"
|
2016-10-29 05:09:40 +00:00
|
|
|
|
2016-10-30 21:21:51 +00:00
|
|
|
# initialise TPM (always keep at bottom of tmux.conf)
|
2016-10-29 05:09:40 +00:00
|
|
|
run ~/.config/tmux/plugins/tpm/tpm
|