-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Allow copying to clipboard #22
Comments
How about https://godoc.org/github.com/BurntSushi/xgb or https://godoc.org/github.com/BurntSushi/xgbutil? Both are pure Go. |
Yeah, I think I looked at that actually; I probably just didn't feel like working on it because the |
https://github.com/golang-design/clipboard is nice, and cross-platform. The big problem with this is how the X clipboard works. When you "copy" something nothing is actually copied; the application just takes ownership of the clipboard, and on paste X asks the application which text to send. This is a well-known annoyance: quit an application and if you had something copied in there then it's lost. Tools like xclip work around this by forking and staying active, so that Running xclip also doesn't really work, since it will wait for xclip to finish, although that may be solvable. And need to look at this whole wayland thing, too. Meh... |
From HN comment https://news.ycombinator.com/item?id=21780608
Also maybe send as direct input (xdotool can do this, but is apparently not reliable across all apps/characters).
Can also link to libX11, but this requires cgo and makes builds harder.
The text was updated successfully, but these errors were encountered: