Wayland Gnome Alternative to wmctrl

I’ve been using a script that utilizes wmctrl to switch windows. When Fedora made Wayland the default, I found out how to disable it in favor of xorg. That has been working fine for years until F43. Now I cannot find a way to disable Wayland or an alternative command-line utility with similar function. All I need to do is activate a window with a specific title. Nothing else. So has anyone found a way to:

  • Disable Wayland and fall back to xorg
  • or … A command that works like wmctrl -a [window name] on Wayland

Thanks in advance.

All this is now specific to the different implementations of Wayland - Mutter on Gnome, KWin on KDE, wlroot, …

I do not know how your script works, and how you do the switching, but I use the Gnome Shell extension “Run or raise” by e2rd to assign shortcut keys that switch to an open window, or loads the application if not started yet.

If your needs are different, a generic answer to your question also points to Gnome Shell extensions: there are extensions that expose dbus calls to manipulate windows from the command line., e.g. “Window Calls” and “Window Calls extended, and others.

Looks like this works for me, though not exactly like my scripts. By the way, I wrote in C TSRs for both Windows and OS/2 to provide this function.