dotfiles/.tmux.conf

113 lines
2.6 KiB
Plaintext

# ------------------------- #
# PREFIX
# ------------------------- #
# Unbind the default PREFIX key
unbind C-b
# Define a PREFIX key
set -g prefix C-z
# ------------------------- #
# Delay
# ------------------------- #
set -s escape-time 1
# ------------------------- #
# Base index for window and panes
# ------------------------- #
set -g base-index 1
setw -g pane-base-index 1
# ------------------------- #
# key-bindings
# ------------------------- #
# Reloading the source file.
bind r source-file ${HOME}/.tmux.conf \; display "~/.tmux.conf reloaded."
# Spliting the window
bind | split-window -h
bind - split-window -v
# Movement keys
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Movement, when pressing TAB
unbind Tab
bind Tab select-pane -t :.+
# vi-like keybindings, when copy-mode
set-window-option -g mode-keys vi
# Resize panes, using vim keybindings
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
# ------------------------ #
# mouse mode
# ------------------------ #
# setw -g mode-mouse off
# ------------------------- #
# Status bar
# ------------------------- #
setw -g monitor-activity on
set -g visual-activity on
set -g status-right "@#(uname -n) %Y/%m/%d %H:%M:%S"
# ------------------------- #
# Colour (Solarized dark)
# ------------------------- #
# default statusbar colors
set-option -g status-style bg=black,fg=yellow,default
# default window title colors
set-window-option -g window-status-style fg=brightblue,bg=default
#set-window-option -g window-status-attr dim
# active window title colors
set-window-option -g window-status-current-style fg=brightred,bg=default
#set-window-option -g window-status-current-attr bright
# pane border
set-option -g pane-border-style fg=black
set-option -g pane-active-border-style fg=brightgreen
# message text
set-option -g message-style bg=black,fg=brightred
# pane number display
set-option -g display-panes-active-colour blue #blue
set-option -g display-panes-colour brightred #orange
# clock
set-window-option -g clock-mode-colour green #green
# Screensaver
set -g lock-after-time 60
set -g lock-command "/usr/games/fortune starwar"
set -g default-terminal "tmux-256color"
# Update with value from default-terminal
set -ga terminal-overrides ",tmux-256color:Tc"
# Ms modifies OSC 52 clipboard handling to work with mosh, see
# https://gist.github.com/yudai/95b20e3da66df1b066531997f982b57b
set -ag terminal-overrides "vte*:XT:Ms=\\E]52;c;%p2%s\\7,xterm*:XT:Ms=\\E]52;c;%p2%s\\7"
# enable OSC 52 clipboard
set -g set-clipboard on