Skip to content

fix(tmux): copy yank to Wayland system clipboard - #9

Merged
vcfvct merged 1 commit into
masterfrom
tmux-wayland-clipboard
Sep 3, 2026
Merged

vcfvct merged 1 commit into
masterfrom
tmux-wayland-clipboard

Conversation

@vcfvct

@vcfvct vcfvct commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

Tmux copy mode was only writing the internal paste buffer. Neovim already reached the system clipboard; tmux did not.

  • Enable tmux_conf_copy_to_os_clipboard.
  • gpakosz/.tmux only pipes yanks to pbcopy / xsel / xclip, none of which exist on this Ubuntu Wayland session.
  • Bind copy-mode y / Enter / mouse drag, plus prefix y, to wl-copy when it is available.

Test plan

  • Reload tmux (prefix r or tmux source ~/.tmux.conf)
  • Enter copy mode, select text, y — paste into another app

oh-my-tmux's copy_to_os_clipboard only knows xsel/xclip, which are not
present on this Ubuntu Wayland setup. Pipe copy-mode yanks through wl-copy.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are narrowly scoped to tmux clipboard behavior, are guarded by wl-copy availability, and align with the stated test plan.

Pull request overview

This PR updates the tmux configuration to ensure text yanked in tmux copy mode reaches the OS clipboard on Ubuntu Wayland sessions by enabling the upstream clipboard integration toggle and adding wl-copy-backed keybindings when available.

Changes:

  • Enabled tmux_conf_copy_to_os_clipboard and clarified Linux/X11 vs Wayland prerequisites in comments.
  • Added conditional Wayland-specific bindings so copy-mode-vi yanks (y / Enter / mouse drag) and prefix + y pipe through wl-copy when installed.
File summaries
File Description
.tmux.conf.local Enables OS clipboard copy and adds wl-copy bindings gated on wl-copy availability for Wayland sessions.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@vcfvct
vcfvct merged commit 8857910 into master Sep 3, 2026
1 check passed
@vcfvct
vcfvct deleted the tmux-wayland-clipboard branch September 3, 2026 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants