Created
June 28, 2019 06:34
-
-
Save hacolab/de84c3d5c032228ddb9fa69676dada7a to your computer and use it in GitHub Desktop.
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
################################################## | |
# Basic config | |
################################################## | |
# use shell (don't load .login file) | |
set -g default-command /bin/tcsh | |
# buffer line size | |
set -g history-limit 10000 | |
# start index | |
set -g base-index 1 | |
set -g pane-base-index 1 | |
set -g renumber-windows on | |
# use mouse | |
setw -g mouse on | |
################################################## | |
# Views | |
################################################## | |
# use 256 color | |
set -g default-terminal screen-256color | |
#set -g terminal-overrides "xterm:colors=256" | |
# pane | |
set -g pane-border-fg white | |
set -g pane-border-bg black | |
set -g pane-active-border-fg black | |
set -g pane-active-border-bg white | |
################################################## | |
# Status line | |
################################################## | |
# general | |
set -g status-interval 1 | |
set -g status-position top | |
set -g status-bg blue | |
set -g status-fg white | |
set -g status-justify "centre" | |
# current | |
setw -g window-status-current-fg black | |
setw -g window-status-current-bg white | |
setw -g window-status-current-attr bright | |
# right | |
set -g status-right-length 80 | |
set -g status-right \ | |
"#[fg=yellow]%y.%m.%d#[default](%a)\ | |
#[bold]%H:%M " | |
################################################## | |
# Key bind | |
################################################## | |
# prefix key | |
unbind C-b | |
set -g prefix C-g | |
bind C-g send-prefix | |
# gard escape,anykey -> M-anykey | |
set -s escape-time 0 | |
# reload tmux config | |
bind R source-file ~/.tmux.conf \; display "Configs reloaded!" | |
# select pane | |
bind -n M-j select-pane -t :.+ | |
bind -n M-k select-pane -t :.- | |
# separate pane | |
bind -n M-s split-window -v | |
bind -n M-v split-window -h | |
# resize pane | |
bind -r h resize-pane -L 2 | |
bind -r j resize-pane -D 2 | |
bind -r k resize-pane -U 2 | |
bind -r l resize-pane -R 2 | |
# swap pane | |
bind -r J swap-pane -t :.+ | |
bind -r K swap-pane -t :.- | |
bind -r C-o rotate-window | |
# new/delete window | |
bind n new-window | |
bind c confirm-before -p "kill-window #W? (y/n)" kill-window | |
# select window | |
bind -n M-K next-window | |
bind -n M-J previous-window | |
# session | |
bind -r H switch-client -p | |
bind -r L switch-client -n | |
# copy mode | |
setw -g mode-keys vi | |
bind v copy-mode | |
bind -T copy-mode-vi v send -X begin-selection | |
bind -T copy-mode-vi V send -X select-line | |
bind -T copy-mode-vi y send -X copy-selection-and-cancel | |
bind p paste-buffer | |
bind C-p choose-buffer -F "#{buffer_sample}" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment