Skip to content

Commit

Permalink
feat(disk): add decimal display option for storage metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
amnweb committed Sep 25, 2024
1 parent ecd0ad3 commit 61225d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/widgets/(Widget)-Disk.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
| `label` | string | `'{volume_label} {space[used][percent]}'` | The format string for the memory widget. Displays free and total virtual memory. |
| `label_alt` | string | `'{volume_label} {space[used][gb]} / {space[total][gb]}'` | The alternative format string for the memory widget. Displays virtual and swap memory percentages. |
| `volume_label` | string | `'C'` | Partition which you want to show in the bar |
| `decimal_display` | integer | `1` | The number of decimal to show, defaul 1 (min 0 max 3) |
| `update_interval` | integer | `60` | The interval in seconds to update the disk widget. Must be between 0 and 3600. |
| `callbacks` | dict | `{'on_left': 'do_nothing', 'on_middle': 'do_nothing', 'on_right': "exec explorer C:\\"}` | Callbacks for mouse events. |

Expand All @@ -28,8 +29,9 @@ disk:
- **label:** The format string for the disk widget. Displays free space in percent.
- **label_alt:** The alternative format string for the disk widget.
- **volume_label:** Partition/volume which you want to show in the bar.
- **decimal_display:** The number of decimal to show, defaul 1 (min 0 max 3).
- **update_interval:** The interval in seconds to update the disk widget. Must be between 0 and 3600.
- **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.


The `label` and `label_alt` options use format strings that can include placeholders for disk widget. These placeholders will be replaced with actual values when the widget is rendered. You can use `{space[used][percent]}`, `{space[used][mb]}`, `{space[used][gb]}`, `{space[free][percent]}`, `{space[free][mb]}`, `{space[free][gb]}`, `{space[total][mb]}`, `{space[total][gb]}`
The `label` and `label_alt` options use format strings that can include placeholders for disk widget. These placeholders will be replaced with actual values when the widget is rendered. You can use `{space[used][percent]}`, `{space[used][mb]}`, `{space[used][gb]}`, `{space[used][tb]}`, `{space[free][percent]}`, `{space[free][mb]}`, `{space[free][gb]}`, `{space[free][tb]}`, `{space[total][mb]}`, `{space[total][gb]}`, `{space[total][tb]}`

0 comments on commit 61225d6

Please sign in to comment.