4
xdotool getactivewindow getwindowpid

I tried this. But it's not working on Wayland. As far as i know. There is no focus window concept on Wayland. So can I get it from Mutter or GNOME-Shell?

LMFuture
  • 41
  • 1
  • I wish that ability too. My current best is using Looking Glass. "[Alt+F2] lg [Enter]" to open it. It does not tell pid but it shows app name, which I can then search in System Monitor and not have to look through tens of processes. There you can get PID or kill the app directly. I hope this helps. – alpersunter May 27 '22 at 09:06
  • Does this answer your question? [How do I get the active window on Gnome Wayland?](https://stackoverflow.com/questions/45465016/how-do-i-get-the-active-window-on-gnome-wayland) – Sebastian Graf Dec 18 '22 at 21:07

0 Answers0