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

Add support for wayland #5

Open
mathix420 opened this issue Feb 27, 2023 · 3 comments
Open

Add support for wayland #5

mathix420 opened this issue Feb 27, 2023 · 3 comments

Comments

@mathix420
Copy link
Contributor

I recently switched to wayland, and sadly this program does not work properly.

To make it work on wayland it should use the wtype binary instead of xdotool.
You can also detect the use of a wayland system with the help of these two env variables: XDG_SESSION_TYPE and WAYLAND_DISPLAY.

Similar implementation: https://github.com/Mange/rofi-emoji/blob/1ac0b7600e0b73c8877a2f3863651c775bbd7ddb/clipboard-adapter.sh#L158

I would love to implement this myself but I have zero experience with rust.

@mathix420
Copy link
Contributor Author

If that can help you, I have made an updated version of this lib that support wayland only https://github.com/mathix420/rofi-totp/tree/support-wayland-only

@revathskumar
Copy link
Owner

@mathix420 Apologies for late reply.
I also don't have much experience with X11/wayland systems.
But my understanding is rofi doesn't support wayland. Please correct me if I am wrong.

So I am not sure, whether switching to wtype from xdotool alone will solve the problem.

@mathix420
Copy link
Contributor Author

No worries, I understand!

I am using a fork or rofi which supports Wayland https://github.com/lbonn/rofi

I was rather thinking of some kind of logic based on the provided env variables to detect which protocol is used and therefore call the right utility to set the clipboard. Not defaulting the whole project to using wtype.

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

No branches or pull requests

2 participants