Make sure to read the note on about exec
The
execdispatcher supports adding rules. Please note some windows might work better, some worse. It records the PID of the spawned process and uses that. For example, if your process forks and then the fork opens a window, this will not work.
hyprctl dispatch exec '[renderunfocused]' "glxgears >> test.log" && tail -f test.log works on my mashine as expected, it caps it at render_unfocused_fps instead of 1
Unless you have a specific reason for setting it only when opened like that, the simpler option is to simply use a window rule. Then it will work regardless of how it’s opened.
Edit: feature idea - window rules rule for when a window is being captured. Captured windows not visible on the screen are still visible to the capturing software so throttling them seems like a bad default, no?