-
-
Notifications
You must be signed in to change notification settings - Fork 18
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 Wayland Support #55
Comments
Most of what we rely on to interact with the system for things like hotkeys, checking for open windows, etc only currently exists for X11. Wayland support might be workable, but it would require looking up / figuring out solutions for these things from scratch. This is something I'd like to do as Wayland seems to be the way of the future, however I have limited time to work on Nyrna so I can't say currently when that would happen. |
Any progress on this? This seems like a great app but on window managers such as sway, this seems not to work at all |
Not as yet, I've been quite busy. I would be happy to consider a pull request if someone wanted to look into this, otherwise it will be when I have some free time. |
I've done some more research and it looks like the things we need (list open windows, names, processes, etc) don't exist for Wayland still - though some proposals for such things are in draft stages. |
FWIW, for sway specifically, I've reimplemented the same functionality with some bash scripts: They require ps, pstree, grep and jq to work you can bind it to a key like |
For reference, this is the issue where this functionality is being discussed: flatpak/xdg-desktop-portal#304 Progress seems to have stalled for the time being, unfortunately. |
Well you could get the input directly from /dev/input. evtest a nice command to start with, but this would require root. |
Well, being able to pause windows by PID or something would come a long way, since it would mean we could pause windows from commandline. Right now the Nyrna GUI does seem to be working in wayland (at least on Hyprland), however the problem is that the pause button doesn't work, it's because wayland is designed so that no application is supposed to be able to read the inputs to another application. But it is possible to bypass this issue by just setting a global shortcut in your compositor, however Being able to pause a specific application or window from the CLI would give wayland users more options until any sort of official wayland support can be added (which, I'm not holding my breath for because wayland is kinda shit when it comes to things like this, at best support for wlroots can be added for something, but universal wayland support is an impossibility) |
Can you clarify what you mean? To my knowledge the hotkey (Pause by default) works fine in Wayland - I tested it just now:
Does your experience differ? |
I think maybe it depends on the compositor (the inherent problem for wayland support, everything depends on the compositor and nothing is standardized...) Sounds like you're on plasma wayland, maybe they somehow set things up for it to just work. But did you try other compositors like sway? I'm on Hyprland. Wayland is designed so that one window is not supposed ot be able to read keyboard inputs to another window (e.g. whenever there is another window focused), if they can it means the compositor is doing something to enable it, but it seems kind of a moot point to be using wayland if you're just patching out all it's "security" features over Xorg which was the main reason stated for wayland being made, doesn't it? (This particular feature is to prevent keylogging) The only way to resolve this issue on Hyprland is global shortcuts, where the compositor intercepts certain key presses no matter what is focused and performs an action. Which means there'd have to be a way to make nyrna suspend applications from commandline in order to actually make the keybind work for many wayland compositors. |
As far as I can tell, Nyrna does not make use of the Global Shortcuts Wayland portal - at least kglobalaccess in my Plasma installation knows nothing about Nyrna. I believe Nyrna uses the X11 protocol to read global shortcuts from XWayland apps, which is part of what Plasma calls "Legacy X11 App Support", and on my system it looks like this: Which - as you can see - is off, but likely the way kwin works is that even when it is off X11 apps can still read keystrokes that are entered in other X11 apps. This actually makes a lot of sense if you know xlib. If I use Nyrna's "application specific hotkey" to specify a key to pause Kate (when running under XWayland), that hotkey will not pause Kate when another Wayland application is active, but will pause Kate if another XWayland application is active. I would guess that doesn't work for you in Hyprland (and possibly other wlroots friends) because they isolate X11 clients from each other. The first thing that I would check if to use |
I think every xwayland application is run with the same xwayland instance, at least i don't see any duplicates. |
Was checking updates on plasma 6, and this popped up: https://www.youtube.com/watch?v=bWWQT3HamBw Might be worth a look to save the state of games to disk |
Also interested in Wayland support, haven't used x11 in almost a year now Is it feasible to get any kind of CLI command to give a process ID, window class etc and pause/resume that? That way hyprland/sway/etc users can setup their own keybindings in the window manager itself Unsure how this tool works under the hood, if it depends on x11 for the actual pause/resume functionality but you mentioned not being able to get key inputs and window titles which this would sidestep at least |
The issue is that Wayland doesn't provide any way to get information about open application windows. This won't change until this issue is resolved: flatpak/xdg-desktop-portal#304 As a workaround I have been hacking together a solution that will work specifically for KDE, though I haven't had time to finish it yet. |
@Merrit please let us know here when the KDE specific workaround is available |
I shall :) Been ridiculously busy both with work-stuff and personal-stuff 😵💫 but I will finish it up soon as I get a chance! 💙 |
First of thanks a lot for making this app available for Linux. It only supports X11/xorg. Do you have any plan to support it under wayland in future? Are their in any difficulties to support it under wayland?
Again, thanks for the app.
The text was updated successfully, but these errors were encountered: