clock_ratio
Fraction of the current period elapsed so far, as a 0..=1 value for gauge and progress-bar renderers. period selects which period (day, hour, week, month, quarter, year).
| Kind | Safety | Shapes |
|---|---|---|
| realtime | Safe | ratio |
Options
Section titled “Options”| Option | Type | Required | Default | Description |
|---|---|---|---|---|
timezone | IANA timezone (e.g. "Asia/Tokyo") | no | system local | Timezone the ratio is computed in. Omit to follow the system clock. |
period | "day" | "year" | "month" | "week" | "quarter" | "hour" | no | "day" | Named period whose elapsed fraction becomes the ratio. |
Compatible renderers
Section titled “Compatible renderers”| Shape | Renderers |
|---|---|
ratio | animated_boot, animated_postfx, animated_scanlines, animated_splitflap, animated_wave, gauge_battery, gauge_circle, gauge_line, gauge_segment, gauge_thermometer |
Preview
Section titled “Preview”ratio via gauge_battery
Section titled “ratio via gauge_battery”┌─────────────────────────────┐ day │█████████████░░░░░░░░░░░░░░░░│▮ 45% └─────────────────────────────┘
[[widget]]id = "clock_ratio"fetcher = "clock_ratio"render = "gauge_battery"ratio via gauge_circle
Section titled “ratio via gauge_circle”██████████████████ ██████████████████day ██████████████████
[[widget]]id = "clock_ratio"fetcher = "clock_ratio"render = "gauge_circle"ratio via gauge_line
Section titled “ratio via gauge_line”day: ▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░ 45%
[[widget]]id = "clock_ratio"fetcher = "clock_ratio"render = "gauge_line"ratio via gauge_segment
Section titled “ratio via gauge_segment”day ▰▰▱▱▱ 45%
[[widget]]id = "clock_ratio"fetcher = "clock_ratio"render = "gauge_segment"ratio via gauge_thermometer
Section titled “ratio via gauge_thermometer”╭─╮ │░│ │░│ │░│ day │█│ 45% │█│ │█│ ╰●╯
[[widget]]id = "clock_ratio"fetcher = "clock_ratio"render = "gauge_thermometer"