Last active
October 23, 2021 02:29
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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