Created
August 16, 2014 08:09
-
-
Save tiev/8bbbf1a1c144ec692a81 to your computer and use it in GitHub Desktop.
My tmux config file
This file contains 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 | |
########################### | |
# increase scroll-back history | |
set -g history-limit 5000 | |
# use vim key bindings | |
setw -g mode-keys vi | |
# disable mouse | |
setw -g mode-mouse off | |
# 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 | |
# highlight window when it has new activity | |
setw -g monitor-activity on | |
set -g visual-activity on | |
set-window-option -g window-status-activity-attr bold,blink,underscore | |
# re-number windows when one is closed | |
set -g renumber-windows on | |
########################### | |
# Key Bindings | |
########################### | |
# tmux prefix | |
unbind C-b | |
set -g prefix C-j | |
# clear-history Ctrl+L and Ctrl+K to clear whole screen and scroll history | |
bind -n C-k clear-history | |
# clear screen when in server-liked terminal | |
bind C-k send-keys -R | |
# window splitting | |
unbind % | |
bind | split-window -h | |
unbind '"' | |
bind - split-window -v | |
# 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 | |
# quickly switch panes | |
unbind ^J | |
bind ^J select-pane -t :.+ | |
# force a reload of the config file | |
unbind r | |
bind r source-file ~/.tmux.conf \; display "Reloaded!" | |
# copy top tmux buffer to clipboard | |
# Dependency: apt-get install xclip | |
bind y run-shell "tmux show-buffer | DISPLAY=:0 xclip -sel clip -i" \; display-message "Copied tmux buffer to system clipboard" | |
########################### | |
# Status Bar | |
########################### | |
# enable UTF-8 support in status bar | |
set -g status-utf8 on | |
# set refresh interval for status bar | |
set -g status-interval 30 | |
# 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=orange]#S#[fg=magenta] #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 | |
# dim window | |
set-window-option -g window-status-attr dim | |
# highlight current window | |
set-window-option -g window-status-current-fg black | |
set-window-option -g window-status-current-bg green | |
set-window-option -g window-status-current-attr bright | |
# 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 | |
# for Powerline | |
run-shell "powerline-daemon -q" | |
source ~/.local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf | |
# use 256 term for pretty colors | |
set -g default-terminal "screen-256color" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment