Created
March 10, 2019 22:14
-
-
Save diligasi/e3d196a1aa7962a864ed007a857f3b9f to your computer and use it in GitHub Desktop.
My awesome tmux config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ----------------------------------------------------------------------------- | |
# This config is targeted for tmux 2.1+ and should be placed in ~/.tmux.conf | |
# Read the "Plugin Manager" section (bottom) before trying to use this config! | |
# ----------------------------------------------------------------------------- | |
# ----------------------------------------------------------------------------- | |
# Change the default prefix key from CTRL+b to CTRL+a | |
# ----------------------------------------------------------------------------- | |
set -g prefix C-a | |
bind C-a send-prefix | |
# ----------------------------------------------------------------------------- | |
# Global options | |
# ----------------------------------------------------------------------------- | |
# Add a bit more scroll history in the buffer. | |
set -g history-limit 50000 | |
# Enable color support inside of tmux. | |
set -g default-terminal "screen-256color" | |
# Ensure window titles get renamed automatically. | |
setw -g automatic-rename | |
# Mouse support | |
# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | |
# Enable full mouse support. | |
set -g mouse on | |
# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | |
# Modes | |
# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | |
setw -g clock-mode-colour colour5 | |
setw -g mode-attr bold | |
setw -g mode-fg colour1 | |
setw -g mode-bg colour18 | |
# Panes | |
# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | |
set -g pane-border-bg colour0 | |
set -g pane-border-fg colour19 | |
set -g pane-active-border-bg colour0 | |
set -g pane-active-border-fg colour9 | |
# Status bar and colors | |
# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | |
set -g status-position bottom | |
set -g status-justify left | |
set -g status-bg colour18 | |
set -g status-fg colour137 | |
set -g status-attr dim | |
set -g status-left '' | |
set -g status-right '#[fg=colour233,bg=colour19,bold] %d/%m #[fg=colour233,bg=colour8,bold] %H:%M:%S ' | |
set -g status-right-length 50 | |
set -g status-left-length 20 | |
setw -g window-status-current-fg colour1 | |
setw -g window-status-current-bg colour19 | |
setw -g window-status-current-attr bold | |
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F ' | |
setw -g window-status-fg colour9 | |
setw -g window-status-bg colour18 | |
setw -g window-status-attr none | |
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F ' | |
setw -g window-status-bell-attr bold | |
setw -g window-status-bell-fg colour255 | |
setw -g window-status-bell-bg colour1 | |
# Messages | |
# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | |
set -g message-attr bold | |
set -g message-fg colour232 | |
set -g message-bg colour16 | |
# Status bar and colors | |
# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | |
# Status bar. | |
# set-option -g status-left "#(~/.tmux/tmux-powerline/powerline.sh left)" | |
# set-option -g status-right "#(~/.tmux/tmux-powerline/powerline.sh right)" | |
# set -g status-justify centre | |
# set-option -g status-interval 2 | |
# set-option -g status-justify "centre" | |
# set-option -g status-left-length 60 | |
# set-option -g status-right-length 140 | |
# set -g status-fg colour69 | |
# set -g status-bg default | |
# set -g status-left '' | |
# set -g status-right-length 0 | |
# I keep the clock hidden, but uncomment the last 2 lines to enable it | |
# set -g status-right-length 20 | |
# set -g status-right '%a %Y-%m-%d %H:%M' | |
# set -g pane-border-fg default | |
# set -g pane-border-bg default | |
# set -g pane-active-border-fg colour69 | |
# set -g pane-active-border-bg default | |
# Highlight the active window in the status bar. | |
# set-window-option -g window-status-current-attr bold | |
# set-window-option -g window-status-current-fg colour69 | |
# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | |
# ----------------------------------------------------------------------------- | |
# Unbind default keys | |
# ----------------------------------------------------------------------------- | |
unbind C-b | |
unbind '"' | |
unbind % | |
# ----------------------------------------------------------------------------- | |
# Remap new bindings | |
# ----------------------------------------------------------------------------- | |
# Reload the tmux config. | |
bind-key r source-file ~/.tmux.conf | |
# Split panes. | |
bind-key h split-window -v | |
bind-key v split-window -h | |
# Move around panes with ALT + Arrow keys. | |
bind-key -n M-Up select-pane -U | |
bind-key -n M-Left select-pane -L | |
bind-key -n M-Down select-pane -D | |
bind-key -n M-Right select-pane -R | |
# ----------------------------------------------------------------------------- | |
# Plugin Manager - https://github.com/tmux-plugins/tpm | |
# In order to use the plugins below you need to install TPM and the plugins. | |
# Step 1) git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm | |
# Step 2) Reload tmux if it's already started with `r | |
# Step 3) Launch tmux and hit `I (capital i) to fetch any plugins | |
# ----------------------------------------------------------------------------- | |
# List of plugins. | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
set -g @plugin 'tmux-plugins/tmux-yank' | |
# Settings for tmux-recurrect: | |
set -g @resurrect-save-bash-history 'on' | |
# Initialize TPM (keep this line at the very bottom of your tmux.conf). | |
run -b '~/.tmux/plugins/tpm/tpm' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment