diff options
| author | David T. Sadler <davidtsadler@googlemail.com> | 2026-01-24 13:20:20 +0000 |
|---|---|---|
| committer | David T. Sadler <davidtsadler@googlemail.com> | 2026-01-24 14:38:39 +0000 |
| commit | 2697d68f6ff3fbf1c1e4ae9fc3e806ed9639881b (patch) | |
| tree | ed7834bfc669c5823092e9af02e54de24ceabe14 | |
| parent | 46db905e881306ce86d6a0c8b8407baaeb7acd0b (diff) | |
Stow tmux
| -rw-r--r-- | tmux/.config/tmux/tmux.conf | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf new file mode 100644 index 0000000..67d585e --- /dev/null +++ b/tmux/.config/tmux/tmux.conf @@ -0,0 +1,78 @@ +# Adapted from https://www.tonybtw.com/tutorial/tmux/ + +# Tells tmux to advertise itself as a 256-color terminal. +set -g default-terminal "tmux-256color" +# Enable true color (24-bit RGB) support. +set -ga terminal-overrides ",*:RGB" + +# Enable mouse support. +set -g mouse on + +# Enable clipboard. +set -g set-clipboard on + +# Bind Ctrl-SPACE to be the tmux prefix. +set -g prefix C-SPACE +bind-key C-SPACE send-prefix + +# Vim-style pane navigation. +bind h select-pane -LZ +bind j select-pane -DZ +bind k select-pane -UZ +bind l select-pane -RZ + +# Alt+cursor keys to switch panes without prefix. +bind -n M-LEFT select-pane -LZ +bind -n M-DOWN select-pane -DZ +bind -n M-UP select-pane -UZ +bind -n M-RIGHT select-pane -RZ + +# Split with v and s (in the same directory) +bind v split-window -h -c "#{pane_current_path}" +bind s split-window -v -c "#{pane_current_path}" + +# Change from 0 based to 1 based because keyboard layout. +set -g base-index 1 +set -g pane-base-index 1 +set-window-option -g pane-base-index 1 +set-option -g renumber-windows on + +# Vim-like copy/paste. +set-window-option -g mode-keys vi +bind-key -T copy-mode-vi v send-keys -X begin-selection +bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle +bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel +unbind -T copy-mode-vi MouseDragEnd1Pane + +# Hide the status bar until I need it. +set -g status off + +# Position the status bar at the top when shown. +set -g status-position top + +# Toggle showing the status bar +bind SPACE set-option status + +# Theme colors based on Nord. +black_bright="#4c566a" +gray_light="#D8DEE9" +gray_medium="#ABB2BF" +gray_dark="#3B4252" + +# Make room for session names. +set -g status-left-length 100 +# Ensure the right side takes up no space. +set -g status-right-length 0 +# Set status bar colors. +set -g status-style "fg=${black_bright},bg=default" +# Just show the session name. +set -g status-left "#[bold]#S" +# Show nothing. +set -g status-right "" +# Hides inactive window names. +set -g window-status-format "" +# Hides the active window name. +set -g window-status-current-format "" +# Set border colors. +set -g pane-border-style "fg=${gray_dark}" +set -g pane-active-border-style "fg=${gray_medium}" |
