Files
dotfiles/.xmonad/scripts/getdGPULoad.py
2020-04-27 15:28:35 +02:00

8 lines
146 B
Python
Executable File

#!/usr/bin/python3
from pynvml import *
nvmlInit()
handle = nvmlDeviceGetHandleByIndex(0)
print(str(nvmlDeviceGetUtilizationRates(handle).gpu))