Remove .config/waybar/scripts/gpu-usage.py
This commit is contained in:
parent
5c8f5fafd6
commit
2392717e21
1 changed files with 0 additions and 16 deletions
|
|
@ -1,16 +0,0 @@
|
||||||
from subprocess import check_output
|
|
||||||
import json
|
|
||||||
|
|
||||||
gpu_usage = check_output(["nvidia-smi", "--query-gpu=utilization.gpu", "--format=csv,noheader,nounits"])
|
|
||||||
|
|
||||||
gpu_usage = gpu_usage.decode('utf-8').replace("\n",'')
|
|
||||||
|
|
||||||
return_json = {
|
|
||||||
"text":gpu_usage,
|
|
||||||
"alt":"GPU_PERCENT",
|
|
||||||
"tooltip":"GPU percentage",
|
|
||||||
"class":"gpu_class",
|
|
||||||
"percentage":int(gpu_usage)
|
|
||||||
}
|
|
||||||
|
|
||||||
print(json.dumps(return_json))
|
|
||||||
Loading…
Reference in a new issue