Create the file stop-proc
below:
#!/bin/bash
SIG=${0##*/} ## basename only (name of the file itself, no dirs)
SIG=${SIG%-*} ## remove filename suffix. "-*" is a glob pattern ("stop" in this case)
SIG=${SIG^^} ## UPPERCASE all letters
## read process from command line or use this as default.
## Change it for what you need
[ $# -gt 0 ] && PROCS="$@" || PROCS="brave chrome firefox slack telegram"
## Replace $1, $2, $N... by the values from $PROCS
set -- $PROCS
## Loop over $1, $2, $N...
for proc; do
echo pkill -$SIG $proc
pkill -$SIG $proc
done
Create a symlink for it. The prefix must be the signal you want to send the processes.
ln -s stop-proc cont-proc`
Send a SIGSTOP signal for CPU hungry processes like brave/chorme/firefox, slack, telegram, whatever. They will stop being scheduled (just like CTRL-Z in bash/sh). To let them run again, send a SIGCONT (continue).