Newer
Older
tmux_settings / .tmux.conf
@aoi1049 aoi1049 on 16 Oct 2019 1 KB fix comments.
# --- frefix key ---
# C-b ==> C-t 
set-option -g prefix C-t
bind-key C-t send-prefix
unbind-key C-b

# --- key bindings ---
# emacs keybindings
set -g mode-keys emacs

# history size
set-option -g history-limit 100000

# --- status bar ---
# normal
set -g status-fg white
set -g status-bg green
set -g status-attr bold 

# window settings
set-option -g renumber-windows on

# status line left side

# status line right side
set -g status-right '#[fg=yellow,bold][%Y/%m/%d(%a)%H:%M]#[default]'
set -g message-attr bold
set -g message-fg white
set -g message-bg red

# active
setw -g window-status-current-fg white
setw -g window-status-current-bg blue
setw -g window-status-current-attr bold

# pane-active-border
set -g pane-active-border-bg default
set -g pane-active-border-fg green

# --- switch a pane ---
# Prefix + C-p : select the pane above
# Prefix + C-n : select the pane below
# Prefix + C-b : select the pane left
# Prefix + C-f : select the pane right
# Up
bind -r C-p select-pane -U
# Down
bind -r C-n select-pane -D
# Left
bind -r C-b select-pane -L
# Right
bind -r C-f select-pane -R

# --- resize pane ---
# -r means command repeatable,
#
# ex) Prefix + +++ means resize a pane of top +3.
#
# Prefix + + : extend the pane to the top
# Prefix + - : extend the pane to the bottom
# Prefix + < : extend the pane to the left
# Prefix + > : extend the pane to the right
# Up
bind -r + resize-pane -U 1
# Down
bind -r - resize-pane -D 1
# Left
bind -r < resize-pane -L 1
# Right
bind -r > resize-pane -R 1

# --- others ---
# reload config file.
bind R source-file ~/.tmux.conf \; display-message "source-file done"

# --- plugins ---
# install tmux plugin to save and restore sessions.
# prefix + Ctrl-s : Save
# prefix + Ctrl-r : Restore
run-shell ~/tmux-resurrect/resurrect.tmux

# auto saving current windows every 60 seconds.
set -g @continuum-save-interval '60'