From 706689753eeed7c22567efb19ace507431e8cf51 Mon Sep 17 00:00:00 2001 From: Jannik Donker Date: Tue, 23 Jun 2026 14:20:40 +0200 Subject: [PATCH] better selection --- tmux.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tmux.conf b/tmux.conf index 3fd109e..4065ec5 100644 --- a/tmux.conf +++ b/tmux.conf @@ -3,6 +3,21 @@ set -g base-index 1 set -g pane-base-index 1 set-option -g status-position top set -g allow-passthrough on +set -g extended-keys on +set -g extended-keys-format csi-u + +# Copy mode: don't copy instantly on mouse-up. Releasing the drag keeps the +# selection and stays in copy mode; press y or Enter to actually copy, q/Esc to cancel. +set -g mode-keys vi +bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X stop-selection +bind -T copy-mode MouseDragEnd1Pane send-keys -X stop-selection +bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel +bind -T copy-mode-vi Enter send-keys -X copy-selection-and-cancel +bind -T copy-mode y send-keys -X copy-selection-and-cancel +bind -T copy-mode Enter send-keys -X copy-selection-and-cancel + +# Subtler selection highlight (instead of the bright orange default) +set -g mode-style "bg=#504945,fg=default" # Right side: date and time set -g status-right "%Y-%m-%d | %H:%M"