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

Paste selected emoji using ydotool on Wayland #161

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ZimbiX
Copy link

@ZimbiX ZimbiX commented Aug 21, 2024

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. :1 means key down, :0 means key up

Edit: Tested in Gnome Shell on Arch Linux

@tom-james-watson
Copy link
Owner

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

@vemonet
Copy link
Collaborator

vemonet commented Oct 16, 2024

ydotool is not the best approach as @tom-james-watson mentioned it requires too many permissions

I have investigated this a bit and this should be already possible to do properly on wayland with the XDG portals and libei "library for Emulated Input", but the available lib, docs and implementation are still a bit rough (thanks wayland for such a well thought and well documented protocol \s)

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)

@ZimbiX

@vasi
Copy link

vasi commented Dec 26, 2024

@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.

@tom-james-watson
Copy link
Owner

Seems reasonable, I guess. I'm not working on emote anymore really though, but would accept a good PR!

@sarowarhosen03
Copy link

@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.

emote isn't perfectly working on wayland

@vemonet
Copy link
Collaborator

vemonet commented Feb 25, 2025

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.

@sarowarhosen03
Copy link

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.

yaah now i'm shift into this extension
image

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.

Pasting in Wayland redux
5 participants