dotfiles/tmux/tmux.conf
2017-12-19 13:47:44 -05:00

71 lines
4.1 KiB
Bash

#===============================================================================
# tmux.conf for niblock || source with <C-b>r
#===============================================================================
#===============================================================================
# General Settings
#===============================================================================
set-option -g prefix C-b # Remap prefix key
set -g default-terminal "screen-256color" # Set terminal
set -g mouse on # Enable mouse
set -sg escape-time 0 # Delay time
set -g display-time 2000 # Message display time
set -g base-index 1 # Start windows at 1
setw -g pane-base-index 1 # Start panes at 1
set -g renumber-windows on # Renumber dynamically
#===============================================================================
# Colors
#===============================================================================
set -g status-fg cyan # Status bar foreground
set -g status-bg black # Status bar background
setw -g window-status-fg cyan # Window list foreground
setw -g window-status-bg black # Window list background
set -g pane-border-fg black # Pane divider foreground
set -g pane-border-bg black # Pane divider background
set -g pane-active-border-fg cyan # Active pane foreground
set -g pane-active-border-bg black # Active pane background
set -g message-fg red # Command line foreground
set -g message-bg black # Command line background
set -g message-attr bright # Bold
#===============================================================================
# Status Line
#===============================================================================
setw -g monitor-activity on # Monitor window activity
set -g visual-activity off # No status line message
set -g allow-rename off # Disallow program renaming
set -g status-left-length 40 # Left-side char length
set -g status-left "#[bright][ #S ] " # Left-side format
set -g status-right-length 80 # Right-side char length
# Right-side format: Custom clock script, in dotfile location
set -g status-right "#[bright]#(sh ~/.dotfiles/tmux/clocks.sh)"
# Window list format, and selected format
set -g window-status-format '#[bg=black,fg=cyan] #I #[bg=default]'
set -g window-status-current-format '#[fg=black,bg=cyan]#[fg=bright] #I '
#===============================================================================
# Key Bindings
#===============================================================================
setw -g mode-keys vi # Vi-like key bindings
bind h select-pane -L # Pane movement: left
bind j select-pane -D # Pane movement: down
bind k select-pane -U # Pane movement: up
bind l select-pane -R # Pane movement: right
bind-key -r C-h select-window -t :- # Window movement: left
bind-key -r C-l select-window -t :+ # Window movement: right
bind -r H resize-pane -L 5 # Pane resize: +5 left
bind -r J resize-pane -D 5 # Pane resize: +5 down
bind -r K resize-pane -U 5 # Pane resize: +5 up
bind -r L resize-pane -R 5 # Pane resize: +5 right
bind | split-window -h -c "#{pane_current_path}" # Horizontal split
bind - split-window -v -c "#{pane_current_path}" # Vertical split
# Reload config file
bind r source-file ~/.tmux.conf \; display "Config Reloaded!"
# Captur selection, create a gist from it
bind-key -tvi-copy u copy-pipe "ruby ~/Lab/gist_gem.rb -"