Skip to content

Commit

Permalink
feat(docs): add label_max_length parameter to Custom widget documenta…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
amnweb committed Nov 25, 2024
1 parent 118facf commit ace9350
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/widgets/(Widget)-Custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
|-----------------|---------|-------------------------------------------------------------------------|-----------------------------------------------------------------------------|
| `label` | string | `"{data}"` | The format string for data |
| `label_alt` | string | `"{data[city]} {data[region]}, {data[country]}"` | Example of label alt. |
| `label_max_length` | int | `None` | The maximum length of the label. |
| `class_name` | string | `"custom-info-widget"` | The CSS class name for the widget. |
| `exec_options` | dict | `{'run_cmd': 'curl.exe https://ipinfo.io', 'run_interval': 120000, 'return_format': 'json', 'hide_empty: false'}` | Execution options for custom widget. |
| `callbacks` | dict | `{'on_left': 'toggle_label', 'on_middle': 'exec cmd /c ncpa.cpl', 'on_right': 'exec cmd /c start https://ipinfo.io/{data[ip]} '}` | Callbacks for mouse events on the IP info widget. |
Expand Down Expand Up @@ -48,6 +49,7 @@ nvidia_temp:
- **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`, `run_interval`, `return_format`, `hide_empty`. `return_format` can be `json` or `string`. If you run custom function which result empty data, you can set `hide_empty` to `true` to hide the widget.
- **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.
Expand Down

0 comments on commit ace9350

Please sign in to comment.