I am aware of the switches you can pass to each app to make it use native wayland, but is there any way to do it globally?
Depends on your distribution. Arch packages some electron apps in a way, where they can accept their own flags through a dedicated file. For others, it’s just a plain ‘electron-flags.conf’ in your ~/.config
I would recommend visiting either the arch wiki, or tour distributions equivalent for details
Keep in mind that this does not apply to CEF apps, as that’s an entirely different framework
For electron, if
ELECTRON_OZONE_PLATFORM_HINT
andelectron-flags.conf
don’t work, you can also add--ozone-platform-hint=wayland
to the end ofExec
in each .desktop file (also works on Chromium, but not CEF AFAIK).There’s also
--ozone-platform-hint=auto
if you find yourself switching between X11 and Wayland.