The process to send SIGSTOP/SIGCONT to can be a single terminal or something with children such as Firefox. I want to freeze the Firefox window I'm focused on like CTRL-z in a terminal with a key binding. If possible, I'd like to freeze only the focused window (multiple tabs) without touching another window with other tabs, but freezing all Firefox tabs is also acceptable.
I'm not sure how to get the PID(s) of the processes in the focused windows, and the target of SIGSTOP can be anything I can get my focus on and not just Firefox.
Is there a way to send SIGSTOP/SIGCONT to only processes of the focused window?