nvidia_temp:
type: "yasb.custom.CustomWidget"options:
label: "{data}<span>\udb81\udd04</span>"label_alt: "{data}"class_name: "system-widget"exec_options:
run_cmd: "powershell nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader"run_interval: 10000# run every 10 secreturn_format: "string"hide_empty: false
Example Configuration to weather data
nvidia_temp:
type: "yasb.custom.CustomWidget"options:
label: "London {data[current][temperature_2m]}{data[current_units][temperature_2m]}"label: "London {data[current][temperature_2m]}{data[current_units][temperature_2m]}"class_name: "custom-widget"exec_options:
run_cmd: "curl.exe http://api.open-meteo.com/v1/forecast?latitude=51.5074&longitude=-0.1278¤t=temperature_2m&timezone=auto"run_interval: 1800000# run every 30 minreturn_format: "json"hide_empty: falseuse_shell: false
Description of Options
label: The format string.
label_alt: The alternative format string.
label_max_length: The maximum length of the label. Minimum value is 1. Default is None.
class_name: The CSS class name for the widget.
exec_options: A dictionary specifying the execution options. The keys are run_cmd command to run, run_interval (in milliseconds), return_format can be json or string, hide_empty (boolean) hide widget if output is empty, use_shell use shell to run command, encoding encoding for the command output, can be utf-8, cp1252, etc.
callbacks: A dictionary specifying the callbacks for mouse events. The keys are on_left, on_middle, and on_right, and the values are the names of the callback functions.
animation: A dictionary specifying the animation settings for the widget. It contains three keys: enabled, type, and duration. The type can be fadeInOut and the duration is the animation duration in milliseconds.
container_padding: Explicitly set padding inside widget container. Use this option to set padding inside the widget container. You can set padding for top, left, bottom and right sides of the widget container.