Skip to content

Instantly share code, notes, and snippets.

@ganta
Last active October 23, 2021 02:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ganta/81a2eb0bd33d88db4b441fceb16ed5df to your computer and use it in GitHub Desktop.
Save ganta/81a2eb0bd33d88db4b441fceb16ed5df to your computer and use it in GitHub Desktop.
Zoom slows down the IME, so change the priority of the IME and Zoom process.
#!/usr/bin/env bash
set -euo pipefail
readonly apps=(
"GoogleJapaneseInput.app:-10"
"zoom.us.app:10"
)
sudo echo -n
for app in "${apps[@]}"
do
app_name=$(echo "${app}" | cut -d : -f 1)
app_nice=$(echo "${app}" | cut -d : -f 2)
echo "#"
echo "# ${app_name}"
echo "#"
pids=($(pgrep -f "${app_name}"))
echo
echo "# before"
ps -p "${pids[*]}" -o pid,nice,command
echo
echo "# change nice"
echo "Change the nice value of the processes to ${app_nice}"
sudo renice ${app_nice} "${pids[@]}"
echo
echo "# after"
ps -p "${pids[*]}" -o pid,nice,command
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment