tmux: Initial config
This commit is contained in:
65
.config/tmux/tmux.conf
Normal file
65
.config/tmux/tmux.conf
Normal file
@@ -0,0 +1,65 @@
|
||||
# Prefix: Ctrl-Space. Chosen over Ctrl-b (awkward reach) and Ctrl-a (collides
|
||||
# with readline's beginning-of-line, which fights editing text in shells and
|
||||
# in Claude Code's prompt). Verified clear of IME/KDE/Claude Code bindings.
|
||||
unbind C-b
|
||||
set -g prefix C-Space
|
||||
bind C-Space send-prefix
|
||||
|
||||
set -g mouse on
|
||||
# OSC52 lets copy-mode selections land in the system clipboard via the
|
||||
# terminal itself (Alacritty supports it) -- no wl-copy/xclip needed, and it
|
||||
# still works over SSH later since the escape sequence travels with the data.
|
||||
set -g set-clipboard on
|
||||
|
||||
set -g mode-keys vi
|
||||
set -g status-keys vi
|
||||
bind -T copy-mode-vi v send -X begin-selection
|
||||
bind -T copy-mode-vi y send -X copy-selection-and-cancel
|
||||
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel
|
||||
|
||||
# tmux's -h/-v split flags name the *arrangement*, not the divider line, which
|
||||
# is backwards from how the divider looks -- so pick keys by what they draw:
|
||||
# \ draws a side-by-side split (vertical line), - draws a stacked split
|
||||
# (horizontal line). Unshifted versions of |/- since splitting is frequent.
|
||||
unbind %
|
||||
unbind '"'
|
||||
bind \\ split-window -h -c "#{pane_current_path}"
|
||||
bind - split-window -v -c "#{pane_current_path}"
|
||||
bind c new-window -c "#{pane_current_path}"
|
||||
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
set -g renumber-windows on
|
||||
|
||||
bind r source-file ~/.config/tmux/tmux.conf \; display-message "tmux.conf reloaded"
|
||||
|
||||
# True color passthrough. ",*" (rather than naming Alacritty's xterm-256color
|
||||
# specifically) so this keeps working if the terminal emulator changes later.
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -ag terminal-overrides ",*:RGB"
|
||||
|
||||
# Default 500ms delay on Esc exists to disambiguate meta-key sequences; it
|
||||
# reads as noticeable lag exiting insert mode in neovim, so drop it.
|
||||
set -sg escape-time 10
|
||||
|
||||
set -g history-limit 10000
|
||||
|
||||
# Minimal status bar (session + window list only), styled to match the Nord
|
||||
# theme already used in alacritty.toml.
|
||||
set -g status-position bottom
|
||||
set -g status-style "bg=#2E3440,fg=#D8DEE9"
|
||||
set -g status-left " #S "
|
||||
set -g status-left-length 20
|
||||
set -g status-right ""
|
||||
setw -g window-status-current-style "bg=#88C0D0,fg=#2E3440,bold"
|
||||
setw -g window-status-current-format " #I:#W "
|
||||
setw -g window-status-format " #I:#W "
|
||||
setw -g window-status-style "fg=#4C566A"
|
||||
|
||||
set -g pane-border-style "fg=#3B4252"
|
||||
set -g pane-active-border-style "fg=#88C0D0"
|
||||
Reference in New Issue
Block a user