Are your games all wine/proton games? For me in sway they all have the same class followed by some uid thing:
] > swaymsg -t get_tree
[...]
#92: output "DP-5"
#70: workspace "21"
#126: con "Automobilista 2" (xwayland, pid: 171976, instance: "steam_app_1066890", class: "steam_app_1066890", X11 window: 0x5400001)
Or gamescope:
] > swaymsg -t get_tree
[...]
#92: output "DP-5"
#70: workspace "21"
#124: con "Assetto Corsa" (xdg_shell, pid: 170694, app_id: "gamescope")
EDIT: Also allow_tearing was added to master 3 weeks ago, so this is definitely not in the current release. FYI to anyone who might try it.
Ah, I should have been more clear. The
CRITERIA
section of the sway documentation states that class matches support regex, so instead of using a*
as you did in your example you’d use a regex any.*
. So I think (untested of course) thatfor_window [class="steam_app_.*"] allow_tearing yes
should work.The comment in the code for allow_tearing notes that it must be enabled on the output as well. Here is the relevant output documentation. There are several other notes/recommendations there as well you should probably pay attention to.