Skip to content

Instantly share code, notes, and snippets.

@0187773933
Created January 1, 2024 07:34
Show Gist options
  • Save 0187773933/82316f0ffecd7742dedd9e09fe879047 to your computer and use it in GitHub Desktop.
Save 0187773933/82316f0ffecd7742dedd9e09fe879047 to your computer and use it in GitHub Desktop.
Limit CPU for Classic WOW
#!/bin/bash
# brew install pidof cpulimit
PID=$(ps aux | grep "/World of Warcraft Classic.app" | grep -v "WowVoiceProxy" | grep -v "grep" | awk '{print $2}')
CPU_LIMIT=170
if [ -n "$1" ]; then
CPU_LIMIT=$1
fi
while true
do
cpulimit -l "$CPU_LIMIT" -p $PID
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment