Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] buffer clipboard support #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Consolatis
Copy link
Owner

@Consolatis Consolatis commented Sep 23, 2022

This PR allows to copy text from the buffer by selecting it with the mouse.

senpai_clipboard_pr

This is my first time working with go so it might be possible I did something stupid because I don't know the language or its default patterns. Feel free to point out any such issues.

Missing:

  • Verify custom pane_width settings for nicknames and text
  • Maybe abstract setting the clipboard via OSC 52 (including base64 encoding) to make it easier to switch to tcell (once supported)
  • Update docs
  • Clean up some comments
  • Revert i -> j change
  • May need to consider unicode char width != 1 when translating from cursor coordinates to runes
  • Use terminfo Ms arg to work on different terminals + feature detection

^ Example:

test -n "$(tput Ms)" && tput Ms c "$(printf "%s" "enjoy your new clipboard content" | base64 --wrap=0)"

When testing via tmux: set -w set-clipboard on.

@delthas
Copy link

delthas commented Jun 19, 2023

Oh, I never saw this PR because it was made against your own master branch

@Consolatis
Copy link
Owner Author

Oh, I never saw this PR because it was made against your own master branch

That was intentional as can be seen in the screenshot above: I prefer not to expose my private email address to the mailing list and am not aware of any other official public git repo that I could post a PR / MR against.

Thus this hack to generate https://github.com/Consolatis/senpai/pull/1.patch which I posted into the IRC channel at that time. Same for the other 2 PRs against this repo.

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