dotfiles/.tmux.conf

63 lines
1.8 KiB
Plaintext

# Load machine-local config.
if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local'
# Make it use C-a, similar to screen.
unbind C-b
unbind l
set -g prefix C-a
bind-key a send-prefix # Send C-a.
bind-key C-a last-window
bind h splitw -h -p 50
bind v splitw -v -p 50
# Start window numbering at 1 for easier switching.
set -g base-index 1
# Do not start login shell.
set -g default-command "exec /bin/zsh"
# Enable Truecolor
set-option -ga terminal-overrides ",xterm*:RGB:Tc,rxvt-unicode*:RGB:Tc"
%if '#{>=:#{version},3.2}'
set -ga terminal-features ",alacritty*:RGB"
%else
set -ga terminal-overrides ",alacritty*:Tc"
%endif
set -g default-terminal "tmux-256color"
# Make M-<up> and so on work in Emacs.
set -g xterm-keys on
set -g history-limit 10000
# Allow multiple commands without pressing the prefix-key again in milliseconds.
set -sg repeat-time 100
# Options for X-terminals.
set-option -g set-titles on
set-option -g set-titles-string "#T"
# Make text selection work
set -g mouse off
# THEME
tmux_colour_status1="colour61" # violet
tmux_colour_status2="colour97" # dark pink
tmux_colour_inactive="colour237" # dark grey
# %hidden does not work with < 3.2, even if it's not accessible
# Status line
set -g status-style fg=${tmux_colour_status1}
set -g status-interval 10
set -g status-left-length 30
set -g status-left ''
set -g status-right "#[fg=${tmux_colour_inactive}]#(hostname --short)#[default] #[fg=${tmux_colour_status2}]#(cut -d ' ' -f 1-3 /proc/loadavg)#[default]"
# Window indicators.
set-window-option -g window-status-style fg=${tmux_colour_status1}
set-window-option -g window-status-current-style fg=black,bg=${tmux_colour_status1}
# Window borders.
set-option -g pane-border-style fg=${tmux_colour_inactive}
set-option -g pane-active-border-style fg=${tmux_colour_status1}