17 lines
358 B
Bash
Executable File
17 lines
358 B
Bash
Executable File
#!/bin/sh
|
|
|
|
snail.nvstat
|
|
|
|
if [ "$?" == 0 ]; then
|
|
echo "Running $@ on nVidia Optimus"
|
|
LD_PRELOAD="/usr/lib/opengl/nvidia/lib/libGL.so:\
|
|
/usr/lib/opengl/nvidia/lib/libnvidia-tls.so" snail.vglrun -d :1 "$@"
|
|
echo "Application $@ was performed on nVidia Optimus"
|
|
|
|
else
|
|
echo "Running $@ on Intel GPU"
|
|
"$@"
|
|
echo "Application $@ was performed on Intel GPU"
|
|
fi
|
|
|