Skip to content

Instantly share code, notes, and snippets.

@Adriem
Last active January 5, 2018 02:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Adriem/2475c66f8fe147d48769b13acba3a87a to your computer and use it in GitHub Desktop.
Save Adriem/2475c66f8fe147d48769b13acba3a87a to your computer and use it in GitHub Desktop.
Tmux config
# ==============================================================================
# File: .tmux.conf
# Author: Adrian Moreno
# Repo: https://github.com/adriem/shell-utilities
# ==============================================================================
# Global settings
set -g default-terminal "screen-256color" # Enable 256 color terminal emulator
set -g status-interval 2 # Status bar refresh interval
set -g set-titles on # Set window title
set-option -g allow-rename off # Prevent window names to be rewriten
setw -g monitor-activity on # Enable visual alert on window activity
set -g base-index 1 # Start window index at 1 instead of 0
setw -g pane-base-index 1 # Start pane index at 1 instead of 0
# Status bar
set -g status-position top # Show tmux status bar on top | bottom
set -g status-justify left # Align tabs to the left | centre | right
# Colours
set -g pane-border-style fg=colour238
set -g pane-active-border-style fg=white
set -g status-style fg=colour016,bg=colour003,bold
set -g status-left-style fg=colour253,bg=black,bold
set -g message-command-style fg=colour235,bg=colour130
set -g message-style fg=colour234,bg=colour208
setw -g window-status-current-fg colour011
setw -g window-status-current-bg colour016
setw -g window-status-current-attr bold,reverse
setw -g window-status-last-fg colour003
setw -g window-status-last-bg colour016
setw -g window-status-last-attr bold,reverse
setw -g window-status-bell-bg colour117
setw -g window-status-activity-style fg=colour234,bg=colour166
setw -g mode-style fg=colour234,bg=colour100
# Default values
# set -g status-left '[#S] '
# set -g status-right ' "#{=21:pane_title}" %H:%M %d-%b-%y'
# set set-titles-string '#S:#I:#W - "#T"'
# setw -g window-status-format '#I:#W#F'
# set -g automatic-rename-format "#{?pane_in_mode,[tmux],#{pane_current_command}}#{?pane_dead,[dead],}"
set -g status-left ''
set -g status-right '[#S] %H:%M '
setw -g window-status-format ' #F#I #W '
setw -g window-status-current-format ' #I #W '
setw -g window-status-separator ''
# setw -g window-status-current-format ' #F(#I #W: #{=10:pane_current_path}) '
set -g set-titles-string 'tmux - ###I #W'
# CUSTOM BINDINGS
# ------------------------------------------------------------------------------
# Reload with CTRL+b r
bind r source-file ~/.tmux.conf
# Move through panes like in vim windows
bind h select-pane -R
bind j select-pane -D
bind k select-pane -U
bind l select-pane -L
bind L swap-window -t +1
bind H swap-window -t -1
# Select last window with CTRL+b b
bind b select-window -l
# Select next/previous window with ALT+g/ALT+t
# bind -n M-g select-window -n
# bind -n M-t select-window -p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment