Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@gcv
Copy link

@gcv gcv commented Dec 11, 2024

Right now, Pyperclip-based clipboard integration does not work with tmux. Or, as far as I can determine, under anything else that does not set DISPLAY and install xclip and do bunch of other X11-specific things. Which is a shame, because Elia works so well on a headless system otherwise.

The “modern” solution to this problem is OSC 52 terminal codes, which most modern terminal emulators recognize. The proposed patch checks to make sure the existing Pyperclip solution is unlikely to work, and checks that /dev/tty is available (because sys.stdout seems to be unavailable or unreliable under Textual). Then it tries to use OSC 52.

This probably does not work on Windows.

The patch is a bit rough, partly because I’m not sure about the appropriate way to add helper code to Elia. It seems to work for me, though.

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.

1 participant