Created
March 6, 2014 11:27
-
-
Save phcostabh/9387674 to your computer and use it in GitHub Desktop.
My tmux configuration
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
########################### | |
# Configuration | |
########################### | |
# use 256 term for pretty colors | |
set -g default-terminal "xterm" | |
#setting the delay between prefix and command | |
set -s escape-time 1 | |
# increase scroll-back history | |
set -g history-limit 5000 | |
# use vim key bindings | |
setw -g mode-keys vi | |
# enable mouse | |
setw -g mode-mouse on | |
# allow mouse to select which pane to use | |
set -g mouse-select-pane on | |
# decrease command delay (increases vim responsiveness) | |
set -sg escape-time 1 | |
# increase repeat time for repeatable commands | |
set -g repeat-time 1000 | |
# start window index at 1 | |
set -g base-index 1 | |
# start pane index at 1 | |
setw -g pane-base-index 1 | |
# Center the window list | |
set -g status-justify centre | |
# enable vi keys. | |
setw -g mode-keys vi | |
# mouse support - set to on if you want to use the mouse | |
setw -g mode-mouse off | |
set -g mouse-select-pane off | |
set -g mouse-resize-pane off | |
set -g mouse-select-window off | |
# enable activity alerts | |
setw -g monitor-activity on | |
set -g visual-activity on | |
# pane colors | |
set -g pane-border-fg green | |
set -g pane-border-bg black | |
set -g pane-active-border-fg white | |
set -g pane-active-border-bg yellow | |
########################### | |
# Key Bindings | |
########################### | |
# tmux prefix | |
unbind C-b | |
set -g prefix C-a | |
# Ensure that we can send Ctrl-A to other apps | |
bind C-a send-prefix | |
# paste | |
unbind C-p | |
bind C-p paste-buffer | |
# window splitting | |
unbind % | |
bind | split-window -h | |
unbind '"' | |
bind - split-window -v | |
# moving between panes | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
# resize panes | |
bind -r H resize-pane -L 5 | |
bind -r J resize-pane -D 5 | |
bind -r K resize-pane -U 5 | |
bind -r L resize-pane -R 5 | |
# create 25% lower split | |
unbind t | |
bind t split-window -p 25 | |
# Quick pane selection | |
bind -r C-h select-window -t :- | |
bind -r C-l select-window -t :+ | |
# Maximize and restore a pane. Only needed for 1.7 and lower. | |
unbind Up | |
bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp | |
unbind Down | |
bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp | |
# shortcut for synchronize-panes toggle | |
bind C-s set-window-option synchronize-panes | |
# Vim-like copy mode | |
unbind [ | |
bind Escape copy-mode | |
unbind p | |
bind p paste-buffer | |
bind -t vi-copy 'v' begin-selection | |
bind -t vi-copy 'y' copy-selection | |
# Log output to a text file on demand | |
bind P pipe-pane -o "cat >>~/#W.log" \; display "Toggled logging to ~/#W.log" | |
# force a reload of the config file | |
unbind r | |
bind r source-file ~/.tmux.conf \; display "Reloaded!" | |
########################### | |
# Status Bar | |
########################### | |
# enable UTF-8 support in status bar | |
set -g status-utf8 on | |
# set refresh interval for status bar | |
set -g status-interval 60 | |
# center the status bar | |
set -g status-justify left | |
# show session, window, pane in left status bar | |
set -g status-left-length 40 | |
set -g status-left '#[fg=green]#S#[fg=blue] #I:#P#[default]' | |
# show hostname, date, time, and battery in right status bar | |
set-option -g status-right '#[fg=green]#H#[default] %m/%d/%y %I:%M\ | |
#[fg=red]#(battery discharging)#[default]#(battery charging)' | |
########################### | |
# Colors | |
########################### | |
# color status bar | |
set -g status-bg colour235 | |
set -g status-fg white | |
# highlight current window | |
set-window-option -g window-status-current-fg black | |
set-window-option -g window-status-current-bg green | |
# set color of active pane | |
set -g pane-border-fg colour235 | |
set -g pane-border-bg black | |
set -g pane-active-border-fg green | |
set -g pane-active-border-bg black |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment