Espanso: Any Wayland support plans?

Created on 20 May 2020  路  5Comments  路  Source: federico-terzi/espanso

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.

Feature Linux

Most helpful comment

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.
Your best bet is to keep the notifications on this issue so that you get notified of all the updates.

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 :)

All 5 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.
Your best bet is to keep the notifications on this issue so that you get notified of all the updates.

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
and even better, a Rust crate: https://github.com/YaLTeR/wl-clipboard-rs

Got a basic POC of the key detection working using the "input.rs" library
inputtest.tar.gz

Which should be coupled with logkeys mappings to obtain the characters back: https://github.com/kernc/logkeys/tree/master/keymaps

Hi @federico-terzi,
Any estimated date when this feature become available?

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).
What I can say is that it's on top of my priority list, as this one is by far the most requested feature.
Two things to keep in mind:

  1. I've done a bit of preliminary testing, and I'm reasonably sure we can port espanso to Wayland. What I'm not sure of is whether we will be able to port all the features, as the techniques we will use are pretty different from the current X11 implementation.
  2. I still have to figure out the optimal way to handle the permissions of this feature, as we need to go deeper in the stack by exploiting /dev/input. That's not possible for regular user-level programs, so we either need to:

    • execute espanso as root. If we choose this route, we will need to figure out the best way to de-elevate the privileges when executing custom scripts or shell commands, as otherwise, we would be running them as root which is super dangerous.

    • add the user to a group which has read/write permissions to /dev/input, but of course that would mean giving also the other user-level processes the same permissions, which is not ideal.

    • the third possible way (but I still haven't got the time to investigate it properly), would be to create another espanso user and add it to the group which can read/write to /dev/input, and execute the espanso daemon as that user. This seems like the best approach to me (as only espanso would benefit from these permissions), but I don't know yet what consequences we could face,

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. 馃槂
[ERROR] Error, can't connect to X11 context 馃槥
BTW: On espanso start there could be at least feature detection with some human friendly feedback like "Wayland is not supported" or smt.

Was this page helpful?
0 / 5 - 0 ratings