-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Wayland support #50
Comments
Wayland is WIP with support for |
I am in Fedora 36 and I think On running |
Not currently, that looks handy though. |
@tecosaur seems like wtype is not an option for gnome or rather mutter. See atx/wtype#22 (comment) |
Ther is also ydotool. Ydotool is working under Gnome. As i see it emacs-everywhere does need:
|
It's not ideal, but initially I just made a tiny extension in which all it does is set the wayland context 'unsafe' to true, which then makes xdotool and all the typical tools work just fine again. class Extension {
constructor() {
}
enable() {
global.context.unsafe_mode = true;
}
disable() {
global.context.unsafe_mode = false;
}
}
function init() {
return new Extension();
} Since then, I have also made another small one that just exposes the info, which I can query from bash, presumaby similar to the links above. I would imagine that is what they are doing. Multiple small functions like this: GetTitle(winid) {
let w = this._get_window_by_wid(winid);
if (w) {
return w.meta_window.get_title();
} else {
throw new Error('Not found');
}
} Making a custom extension to add the things you need/want ended up being much easier than expected if you look over a basic extension template. It's just a JS file and a json manifest with some details for name and what not, then you can expose most anything you want/need. Doing the unsafe = true, though, just makes everything you expect to work, work, at the expense of potential vulnerabilities. Though, I don't think they are much different than when those apps all worked properly in the first place... |
This is still failing with
|
Shouldn't this issue be left open given that it doesn't actually support Wayland? |
Yep, it should be - particularly since now I can boot to Wayland without my WM crashing (a recent development), I can actually work on this |
The challenge here is finding wayland tools that can provide all the needed functionality. What we're currently using for X11 is:
|
have you taken a look at kdotool ? It seems to have what is needed to get this working on plasma wayland. Here's my idea:
currently working on this at: https://gitlab.com/mohsmth1/emacs-everywhere/-/tree/wayland-kde. Haven't gotten it to work yet. |
Oh brilliant, I suspect that |
I feel like I'm pretty close to getting it working. Emacs does pop up on hotkey, but I get error:
everything looks good, not sure why the id is 0 though because it gets the correct id. |
might be interested: |
Brilliant! @msin32 have you considered opening a draft PR? |
I don't see why it wouldn't work, give it a try and report back. My changes are in the |
I will do it soon |
I actually just found out I can't properly test it on NixOS because kdotool isn't on the nixpkg repository sadly 😢 Made a request here, so will have to wait til it gets added in. |
It is available as a crate as well, |
It looks like what we really need to end up with is support for an assortment of wayland-supporting cli tools, via a bunch of |
yes, this particular code should work with most kwin desktops including kde 5 and 6, kwinft/theseus, deepin_kwin and others. |
Mmm, ideally we also want to work with gnome, sway, etc. though |
sway and many other wayland WMs use wlroots, I know that has Also, draft PR created |
On keybind I get |
Ooops, that |
I'll try to make this work on Hyprland. I'll also try replacing ydotool with wtype since that's much lighter (doesn't require having a background service). |
I have a plan for sway and gnome-wayland support. The pasting doesn't work anymore even on KDE wayland, but it did in my PR. Maybe needs adjusting
|
Is KDE Plasma Wayland already supported? Perhaps, you could add a section about current extent of Wayland support in the README. |
I tried installing kdotools-git from the AUR. The frame shows up now but it doesn't automatically paste the content on C-c C-c. It also doesn't pick up the text already in text area. |
Would be nice to not only support kde and also support hyprland too |
There are notes on hyperland support in the wiki, and I'll be updating the readme to mention this in the near future. |
Both Fedora and Ubuntu have switched to Wayland by default. |
Hey kdotool just got merged into nixpkgs, so I will be able to actually test it sometime soon when it hits the unstable branch! |
Hey, I have a basic implementation of the needed functions for sway/wayland here: #93 |
I have a PR here that uses dotool instead of |
Hmmm, at the moment it does not work any better than |
I'm fairly sure For me using plasma wayland, pasting without a region selected works every time. |
I use wtype instead, it works fine. |
Hey @msin32 and @andresilva , I tested @msin32 yeah, creating a temp file for every paste is a bit weird, but that is a secondary problem at the moment, I guess... |
Just found out that you can use firefox tridactyl addon with |
I discovered this over at the org mailinglist, but I wonder if this project supports Wayland, the X11 successor for Linux. Given that the README currently says that
are required, I would not assume it does. There’s a Wayland alternative for
xclip
called wl-clipboard, but for the others I don’t know.So, what’s the plan with Wayland?
The text was updated successfully, but these errors were encountered: