Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Nic Schmidt edited this page Dec 25, 2022 · 1 revision

Usage

Read here.

Description

Shows the current GPU usage and temperature.

Requires nvidia-smi to be installed.

local mygpu = lain.widget.contrib.nvidia()

Input table

Variable Meaning Type Default
timeout Refresh timeout (in seconds) integer 5
exec Command to get comma-separated usage and temperature string nvidia-smi --query-gpu=utilization.gpu,temperature.gpu --format=csv,noheader,nounits
format String format for output string "%.1f"
settings User settings function empty function
widget Widget to render function wibox.widget.textbox

settings can use these strings:

  • gpu.usage, the GPU usage percentage;
  • gpu.temperature, the GPU temperature in °C.

Output table

Variable Meaning Type
widget The widget wibox.widget.textbox
update Update widget function

Clone this wiki locally