-
-
Save NicolasNarvaez/70f468ef87fbc2a9d611541b6bee1308 to your computer and use it in GitHub Desktop.
The best and greatest tmux.conf ever
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
unbind C-n | |
set -g prefix C-b | |
# $ syntax defines subdocument tags that generate.js can split-interpolate | |
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 | |
setw -g mode-keys vi | |
setw -g mouse on | |
setw -g monitor-activity on | |
# THEME | |
set -g status-bg colour1 | |
set -g status-fg white | |
set -g window-status-current-bg white | |
set -g window-status-current-fg black | |
set -g window-status-current-attr bold | |
set -g status-interval 60 | |
set -g status-left-length 30 | |
set -g status-left '#[fg=green](#S) #(whoami)' | |
set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%H:%M#[default]' | |
#vim compat.: | |
#sends correctyl ctrl-arrow | |
set-window-option -g xterm-keys on | |
#and in your ~/.vimrc | |
#if &term =~ '^screen' | |
# " tmux will send xterm-style keys when its xterm-keys option is on | |
# execute "set <xUp>=\e[1;*A" | |
# execute "set <xDown>=\e[1;*B" | |
# execute "set <xRight>=\e[1;*C" | |
# execute "set <xLeft>=\e[1;*D" | |
#endif | |
# No delay for escape key press | |
set -sg escape-time 0 | |
#bind = alias(bind-key) => they are equal | |
#bin = bind , because shorter string matching uniquely a command equals command | |
#for multiple comands on keybind: comand \; command | |
#for multiline commands: command \; \ | |
# command | |
#nest management | |
bind -n M-F11 set -g status-bg colour1 | |
bind -n M-F12 set -g status-bg black | |
bind -n S-down \ | |
send-keys M-F12 \; \ | |
set -g status-bg colour1 \; \ | |
bind-key q kill-session \; \ | |
bind-key Q confirm-before kill-server \; \ | |
bind r source-file ~/.tmux.conf \; \ | |
bind-key -n C-e split-window -h -c '#{pane_current_path}' \; \ | |
bind-key -n C-o split-window -v -c '#{pane_current_path}' \; \ | |
bind-key -n M-j resize-pane -D \; \ | |
bind-key -n M-k resize-pane -U \; \ | |
bind-key -n M-h resize-pane -L \; \ | |
bind-key -n M-l resize-pane -R \; \ | |
bind-key -n S-M-down resize-pane -D 8 \; \ | |
bind-key -n S-M-up resize-pane -U 8 \; \ | |
bind-key -n S-M-left resize-pane -L 8 \; \ | |
bind-key -n S-M-right resize-pane -R 8 \; \ | |
bind -n M-Left select-pane -L \; \ | |
bind -n M-Right select-pane -R \; \ | |
bind -n M-Up select-pane -U \; \ | |
bind -n M-Down select-pane -D \; \ | |
bind -n C-ppage copy-mode \; \ | |
bind -n C-down new-window -a -c '#{pane_current_path}' \; \ | |
bind -n C-S-left swap-window -t -1 \; \ | |
bind -n C-S-right swap-window -t +1 \; \ | |
bind -n S-Left previous-window \; \ | |
bind -n S-Right next-window \; \ | |
bind-key -t vi-copy 'v' begin-selection \; \ | |
bind-key -t vi-copy 'y' copy-selection \; \ | |
bind-key -t vi-copy 'r' rectangle-toggle \; \ | |
bind -t vi-copy y copy-pipe "xclip -sel clip -i" \; \ | |
send-keys S-up \; \ | |
set -g prefix C-b | |
bind -n S-up \ | |
send-keys M-F11 \; \ | |
set -g status-bg black \; \ | |
unbind -n C-e \; \ | |
unbind -n C-o \; \ | |
unbind -n M-j \; \ | |
unbind -n M-k \; \ | |
unbind -n M-h \; \ | |
unbind -n M-l \; \ | |
unbind -n S-M-down \; \ | |
unbind -n S-M-up \; \ | |
unbind -n S-M-left \; \ | |
unbind -n S-M-right \; \ | |
unbind -n M-Left \; \ | |
unbind -n M-Right \; \ | |
unbind -n M-Up \; \ | |
unbind -n M-Down \; \ | |
unbind -n C-ppage \; \ | |
unbind -n C-down \; \ | |
unbind -n C-S-left \; \ | |
unbind -n C-S-right \; \ | |
unbind -n S-Left \; \ | |
unbind -n S-Right \; \ | |
send-keys S-down \; \ | |
set -g prefix C-n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment