Skip to content

Instantly share code, notes, and snippets.

@gidoBOSSftw5731
Last active September 11, 2022 00:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gidoBOSSftw5731/3fbd60d7bf140319f4a7de889123071e to your computer and use it in GitHub Desktop.
Save gidoBOSSftw5731/3fbd60d7bf140319f4a7de889123071e to your computer and use it in GitHub Desktop.
Stop folding at home automatically when FFMPEG begins encoding (NVIDIA GPU)
#!/bin/bash
export id=3
while true
do
export out=`nvidia-smi --query-compute-apps=name --format=csv |grep ffmpeg|wc -l`
case "$out" in
"0")
FAHClient --send-unpause $id
;;
*)
FAHClient --send-pause $id
;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment