From 429f8e96ef33b445f1c49c89df1c38bd1fe181de Mon Sep 17 00:00:00 2001 From: rictus Date: Thu, 22 Jan 2026 21:36:13 -0800 Subject: [PATCH] feat(tmux): enable clipboard integration in mayor sessions Add set-clipboard option to EnableMouseMode function so copied text goes to system clipboard via OSC 52 terminal escape sequences. Closes #843 Co-Authored-By: Claude Opus 4.5 --- internal/tmux/tmux.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/internal/tmux/tmux.go b/internal/tmux/tmux.go index 9d317ffe..d11b3231 100644 --- a/internal/tmux/tmux.go +++ b/internal/tmux/tmux.go @@ -1254,11 +1254,17 @@ func (t *Tmux) ConfigureGasTownSession(session string, theme Theme, rig, worker, return nil } -// EnableMouseMode enables mouse support for a tmux session. +// EnableMouseMode enables mouse support and clipboard integration for a tmux session. // This allows clicking to select panes/windows, scrolling with mouse wheel, // and dragging to resize panes. Hold Shift for native terminal text selection. +// Also enables clipboard integration so copied text goes to system clipboard. func (t *Tmux) EnableMouseMode(session string) error { - _, err := t.run("set-option", "-t", session, "mouse", "on") + if _, err := t.run("set-option", "-t", session, "mouse", "on"); err != nil { + return err + } + // Enable clipboard integration with terminal (OSC 52) + // This allows copying text to system clipboard when selecting with mouse + _, err := t.run("set-option", "-t", session, "set-clipboard", "on") return err }