Open tronfy opened 1 year ago
As this widget is quite simple, I'd suggest creating a watch
recipe instead:
local nvidia = awful.widget.watch( -- dependency: nvidia-smi
"nvidia-smi --query-gpu=utilization.gpu,temperature.gpu --format=csv,noheader,nounits",
5, -- timeout in seconds
function(widget, stdout)
local usage, temp = stdout:match("([^,]+),([^,]+)")
widget:set_text(string.format("%d%% %.1f", usage, temp)) -- customize here
end)
Please create a PR to awesome-www. See here for previous examples.
Adds
widget/contrib/nvidia.lua
, for accessing NVIDIA GPU usage and temperature info.Requires
nvidia-smi
to be installed. This is made clear in a comment and in the proposed wiki page for the widget.Proposed wiki page: https://github.com/tronfy/lain/wiki/nvidia