-
-
Notifications
You must be signed in to change notification settings - Fork 261
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Any Wayland support plans? #287
Comments
Hey @crispinb , Thanks for your interest in espanso! I definitely don't exclude the possibility of supporting Wayland in the future, but it will surely take a while (many months) as it would require a non-trivial rewrite of the espanso core. For everybody else: if you are interested in this feature, leave a "like" reaction to the post of @crispinb so that I can have an idea of the demand for this feature. Cheers :) |
As a reference for the future, this project seems to use the APIs we need: https://github.com/ReimuNotMoe/ydotool Also for the clipboard APIs: https://github.com/bugaevc/wl-clipboard Got a basic POC of the key detection working using the "input.rs" library Which should be coupled with logkeys mappings to obtain the characters back: https://github.com/kernc/logkeys/tree/master/keymaps |
Hi @federico-terzi, |
Hey @MohammedAl-Mahdawi, Thank you for the interest! It's hard to estimate the date, as for the upcoming 3/4 months I'll be very busy with university, so it's unlikely I'll be able to tackle this feature just yet (as it requires a non-trivial rewrite of the core).
I'm really open to ideas and proposals, as your experience really matters here! So if you have an idea, don't hesitate to write them here. Cheers :) |
Also would love to see this happen. Switched to the Wayland/Sway a while ago and... somewhat missing Espanso there. 😃 |
I've got some great news! As part of the major refactor happening in the It will take a while as there are still a lot of modules to rewrite, but the hardest part is now done! wayland.mp4 |
I used |
@gusbemacbe That's expected, given that the |
I came looking for this. Hoping this can be worked on soon. Cheers. |
@federico-terzi any updates? |
@reesericci Thank you for the interest!
Yes, the upcoming version 2 will ship with experimental Wayland support, hopefully by the end of September. Right now, there are two major things I still need to figure out:
Keep in mind that the Wayland ecosystem is so fragmented that it's hard for me to make sure everything works as expected on all distros. So far, I've been testing it in a Fedora VM (with Gnome), but in theory, it should work on Sway as well. Hopefully, with some help from the community, we'll be able to get something stable by the end of the year :) |
I can test it on Debian 11 (Bullseye). |
Definitely will test on ubuntu/sway 😀 |
I can test it on Manjaro (Archlinux derivative) with Gnome DE and Sway. |
I can test on F34 KDE! |
I became heavily invested in the Wayland ecosystem in the last few months, which is why I finally wanted to chime in here. Detecting applicationsThis is hard. Wayland is supposed to be secretive about this. No application should know about any other application. AFAIK current methods are not really intended for what espanso wants to achieve. On Sway for example one can use IPC to get the window tree (and also which window is focused). A better approach would probably be some Wayland protocol, which can be used to at least identify applications. Sadly the best way forward is probably to not have support for app-specific stuff (including the list of applications that need special treatment) for now. Capturing key-pressesI saw that espanso uses evdev. It's probably the only way forward right now. I doubt that an official Wayland protocol that allows for key-logging would get far. Similarly to detecting applications this would probably need more infrastructure around it (like the compositor asking the user, if espanso is allowed to do that, in addition to being able to "remember this choice"). Inserting textCurrently espanso only uses wl-clipboard for this? If more backends are planned then wtype might be of interest, as it utilizes Overall statusEspanso on Wayland is and will be rough. Wayland is currently not built in a way that allows this use-case. But as more and more people start switching to Wayland, these kinds of use-cases will be needed more and more. |
Hey @Scrumplex, Thank you for the insightful feedback! I'll try to share some thoughts as well:
I definitely agree. Detecting the active application will be very problematic until a dedicated protocol is designed for this task. Some workarounds are possible on Sway and Gnome, but I doubt a robust implementation will be possible with the tools currently available. For now, app-specific configurations won't be supported.
Yes, exactly. That's the experience we have on macOS (blocked by default until the user explicitly grants permissions). Sadly, I don't think we would get anything similar on Wayland soon. In the meanwhile, the EVDEV backend provides a decent alternative.
Thank you for pointing this out! I didn't know about
You are absolutely right, the Wayland experience won't be as performant and feature-complete as the other implementations. That said, I don't want to leave Wayland users behind. Despite the significant technical limitations, I'd love to provide a basic text-expanding experience there as well, and I think it's within our possibilities. Also, I'd love to get some help from the community to implement some ad-hoc Wayland protocols to improve the experience (we would need one for keypress detection and one to get the currently active application). It will take time, but I'm optimistic :) The v2 is designed to be highly modular, so we can "swap" new implementations as they become available
That's what I'm looking forward to in the mid future. Wayland is here to stay, and we'll try our best to get Espanso working there as well! Thank you for your help :) |
I would like to volunteer if you need testers, ArchLinux Gnome. wtype does not work on Gnome though:
Current espanso continues to work on xwayland applications, I now use konsole as my terminal because espanso is fine!! |
Hey guys! As some of you may have noticed, we've released the first alpha versions of Espanso v2. It still has some rough edges but it should be usable already for most use-cases. The "official" releases did not include the Wayland port because we still need to figure out the optimal release strategy there, but I've written a section in the docs with the instructions to compile Espanso yourself on Wayland, which should be easy enough for most users! I've tested Espanso on Ubuntu and Fedora, but other distros should have similar setups and will only differ in the way you install the required packages. In fact, if you happen to use another distro and manage to install Espanso, please share the packages you installed here so that we can update the docs :) A couple of things to keep in mind:
Until then, happy expanding! |
Thank you so much for doing this. I really appreciate it - and, indeed, it works. I have added a couple of documentation issues / thoughts here, as well as some comments for anyone else trying to install this. |
Seems to work great on arch and plasma-wayland. 👏 I had to install wxgtk2 or change the references in espanso-modulo/build.rs. Wxgtk3 was installed but is invoked as wx-config-gtk3 instead of wx-config. Split Package Details - wxgtk |
@Schlaefer Interesting, thanks for reporting! I've opened an issue: #840 |
Whenever I start espanso it says "espanso started correctly!" yet when I run espanso status it says "espanso is not running". :espanso is not working F34, x86_64, KDE Plasma 5.22.5, espanso 2.0.4-alpha |
This happens to me on the last version as well. |
@reesericci @jacostag Thank you for reporting! The next time it happens, could you please post the output of |
|
After I added myself to the |
Espanso 2.0.5-alpha is running without issues on Pop_os! 21.04 wayland 👍 |
I advice espanso's |
@gusbemacbe Thank you for the feedback! Not sure if that's due to
|
I'm going to test on GNOME. Observe that espanso's If you want to investigate profoundly, install Endeavour OS with KDE and Wayland on a virtual machine. |
I don't know if this is the correct place to ask, but I have just installed espanso on my Manjaro KDE. |
@Delanii, it does work, but you will be able to trigger the keys on only the apps built in X. You'll not be able to trigger the keys in Konsole. |
@federico-terzi Is there any chance for a flatpak? That's the native format for Fedora Silverblue, as well as other immutable distros. e.g. Steam Deck. Flatpak is also winning the universal packaging wars across all distros. |
@reesericci there's already a flatpak discussion over here: #386 |
perfect |
Hi!
Maybe this helps. |
@hseliger Thanks for sharing! |
Sure. The same call, btw, also returns the details on PID and window title. the gdbus cal returns a JSON, the active window has the entry "focus" set to true. You get e.g. I briefly tried to dig into the gtk-rs documentation, but I don't have the time to figure out how to do the gdbus call from rust to build an example. |
When will there be a Wayland Flatpak or AppImage? |
It stopped working for me on KDE plasma 5.25. Insta-Crash on startup.
|
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
I see in the documentation that Wayland isn't currently supported. Are there any plans (however tentative) to do so at some point? I ask because I'd like to know whether it's worth my while following espanso's releases/progress.
The text was updated successfully, but these errors were encountered: