Wayland, clipboards and wl-clipboard
Okay, dull even by my standards.
I have a bash function which I use to generate a meeting URL for our jitsi video conferencing system.
I type the function name in the terminal, and it generates the URL. Nice and simple.
I typically need this to paste into a calendar invitation, or into a chat on another platform, so I don’t want the output in the terminal but on a clipboard from which I can paste it.
If I were using X, I would use xcopy
, but this is not available, because I am using Wayland.
I’m not sure if there is a native way of doing this in Wayland, but the package wl-clipboard
seems to do the job nicely. (Here’s the man page.)
If I’ve captured the value of the meeting URL into $MEETINGURL
, I can just add it to the clipboard for pasting with wl-copy $MEETINGURL
.
Even better would be string expansion when I type “meetingurl” into the calendar invitation, so that it automatically runs the script to generate the URL and pastes it in. I did that in macOS using aText
before a macOS security feature, Secure Input, basically made it unusable. I would use espanso
, which does much the same for Linux, but it does not support Wayland yet. However, fingers crossed, Wayland support is coming to espanso soon…
You may also like:
- Adjusting the scroll speed of an Apple Magic Mouse on Debian 11
- Surface Pro 6, Debian 11 Bullseye, Gnome 3, Wayland, and two 4k@60 external monitors
- Microsoft Surface Pro with Debian 11 Bullseye: emulating right-click on Type Cover trackpad
- Installing Chitubox (3d printer slicing software) on Debian 11
- Working front and rear cameras on Debian 11 on a Surface Pro 6, SurfaceBook 2, and Surface Go
- This one simple hack solved my Debian 11 Bluetooth audio problems