I have implemented a KDE-Wayland analogue of XKill called…wait for it…wkill. Usage is like you’d expect: you run it, you get a crosshair, you click on the window you want to kill, and it is killed.
Technical implementation is, in essence:
On click, send zwlr_foreign_toplevel_handle_v1.close() to the compositor (politely requesting the application to an hero).
Then, resolve the PID from /proc by matching app_id,, then send SIGTERM (or SIGKILL if launched with -9).
I know KDE comes with ctrl-meta-esc, but I like to continue to use things the way I’ve become accustomed to using them. I will probably not release this since it’s technically redundant. However, this does prove that the “XKill isn’t possible with Wayland” line going around is BS provided that your compositor exposes a way to get process under cursor.
However, this is once again an example of why Wayland is a massive engineering disaster which has been designed (following POSIWID) to reduce the number of desktop environments available by making every single thing so fucking complicated that even every desktop environment will probably have to implement its OWN xkill. It’s sleepwalking into allowing whoever is biggest to set the standards and expect everyone else to fall in line. And tbh I’d rather go back to using a Mac than run GNOME, so let’s not let that pos win.