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

Use wtype instead of ydotool on wayland #86

Closed
wants to merge 1 commit into from

Conversation

andresilva
Copy link

@andresilva andresilva commented Apr 15, 2024

wtype eases the setup since it doesn't require having a background daemon running like ydotool.

#50

@andresilva
Copy link
Author

andresilva commented Apr 15, 2024

@msin32 can you test whether this works for you? I couldn't get paste to work on Hyprland with either ydotool or wtype (it works in a terminal, just not through emacs-everywhere).

@@ -85,7 +85,7 @@ To not run any command, set to nil."
(pcase (car emacs-everywhere--display-server)
('x11 (list "xclip" "-selection" "clipboard" "%f"))
('wayland
(list "sh" "-c" "wl-copy < %f"))
(list "sh" "-c" "wl-copy -p < %f"))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this will work on KDE. I think by default KDE binds Shift+Insert to pasting from clipboard buffer rather than primary (which is not standard). Try removing this is if it doesn't work and let me know.

@msin32
Copy link
Contributor

msin32 commented Apr 15, 2024

@msin32 can you test whether this works for you? I couldn't get paste to work on Hyprland with either ydotool or wtype (it works in a terminal, just not through emacs-everywhere).

See my comment here: #50 (comment), not sure what broke but I will test your change soon

@msin32
Copy link
Contributor

msin32 commented Apr 16, 2024

It doesn't work, one issue seems to be with id:

| | 3 <- emacs-everywhere--app-info-linux: #s(emacs-everywhere-app :id 0 :class "konsole" :title "~ : fish — Konsole <3>" :geometry (54 0 1081 1200))

The id is 0. However, when I change :id (string-to-number window-id) to id: window-id in the --app-info-linux function I get the correct window id.
I believe I had this change in my PR as well. However, even with this fix, it still isn't pasting and I'm not sure if it focuses the window either.
Looking at the traces between my working version, it seems to be getting app-info correctly, I'm not sure why it won't work
@tecosaur

@tecosaur
Copy link
Owner

I believe I had this change in my PR as well. However, even with this fix, it still isn't pasting and I'm not sure if it focuses the window either. Looking at the traces between my working version, it seems to be getting app-info correctly, I'm not sure why it won't work.

@msin32 I tried to copy the changes/details of your PR while also refactoring it, but unfortunately it seems that something was lost in the refactoring 😕. Hopefully we can resolve this with a little more trial-and-error debugging...

@tecosaur
Copy link
Owner

tecosaur commented Apr 16, 2024

I've pushed a few commits, and on my end at least the current setup is working with KDE on wayland.

@msin32
Copy link
Contributor

msin32 commented Apr 16, 2024

works for me too

@msin32
Copy link
Contributor

msin32 commented Apr 16, 2024

I just remembered, I tried using wtype before but it isn't supported on KDE plasma:

~> wtype -M Shift Insert -m Shift
Compositor does not support the virtual keyboard protocol

you could add a paste function specific to wlroots/supported WMs

@andresilva
Copy link
Author

I'll close this then since only KDE/GNOME support is planned.

@andresilva andresilva closed this Apr 16, 2024
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.

3 participants