Paste selected emoji using ydotool on Wayland#161
Paste selected emoji using ydotool on Wayland#161ZimbiX wants to merge 2 commits intotom-james-watson:masterfrom
Conversation
Resolves tom-james-watson#157. Related: tom-james-watson#44. ydotool must be installed with ydotoold running
|
Hello, thanks for your interest. We can't just rely on the user having certain system packages installed, unfortunately. Xdotool is bundled with the app already, built into the snap and flatpak packages. The problem with ydotool is that it requires a daemon that needs to run as root and when I looked at this previously I could not find a way to get a flatpak or snap to be configured to run privileged code like that. That's the actual hard part - if someone can work out that part then the actual usage of ydotool is simple enough. Please see the past PRs related to this for more context: https://github.com/tom-james-watson/Emote/pulls?q=is%3Apr+ydotool |
|
I have investigated this a bit and this should be already possible to do properly on wayland with the XDG portals and You can find more details and links here: https://github.com/vemonet/EmojiMart?tab=readme-ov-file#%EF%B8%8F-todo There seems to be a library for libei python bindings here: https://gitlab.freedesktop.org/libinput/snegg Personally I don't have the time to struggle with this (and I am still on x11 anyway, everytime I try wayland everything just breaks stutters all over the place, professional screenshare impossible, I don't know how people can actually use it) |
|
@tom-james-watson What would you think of the approach of allowing the user to choose an auto-paste command? That would let us wait for Wayland-based solutions to mature before building anything into Emote—while advanced users could experiment with wtype, ydotool, some new libei-based solution, etc. Maybe it could be a hidden preference. |
|
Seems reasonable, I guess. I'm not working on emote anymore really though, but would accept a good PR! |
emote isn't perfectly working on wayland |
|
https://gist.github.com/probonopd/9feb7c20257af5dd915e3a9f2d1f2277 Despite what some people try to make you think Wayland is not ready for serious use. After 10 years development we barely start to have APIs for clipboard and screen sharing, which are really basic and should have been thought of day 1. |
|
|
The AUR patch, that I used on wayland without any issue for 2 years, has this line: 29 being ctrl and 47 being v. |
|
Related: https://git.sr.ht/~geb/dotool |

Resolves #157.
Related: #44.
ydotool must be installed with ydotoold running
The key codes for Ctrl+Shift+V in the command are from
/usr/include/linux/input-event-codes.h.:1means key down,:0means key upEdit: Tested in Gnome Shell on Arch Linux