Ring
Ring progress, Clockwise direction: $$\frac{π}{2}$$
> $$\frac{-3π}{2}$$
.
This widget can only be as a stand alone widget, it should be contained with in a Box
.
Ring provide some basic presets for system info.
{
"index": [-1, -1],
"widget": {
"font_family": "JetBrainsMono Nerd Font",
"fg_color": "#BEAFD9",
"bg_color": "#00000044",
"type": "ring",
"prefix": " ",
"suffix": " {float:4,100}%",
"suffix_hide": true,
"preset": {
"type": "custom",
"update_interval": 100,
"cmd": "seq 0 .01 1 | shuf | head -n1"
}
}
}
{
"index": [-1, -1],
"widget": {
"font_family": "JetBrainsMono Nerd Font",
"bg_color": "#00000044",
"type": "ring",
"prefix": " ",
"suffix": " {preset} {progress:2,100}%",
"suffix_hide": true,
"preset": {
"type": "ram"
}
}
}
bg_color
Color of the background of widget.
Support: #rgb
/#rrggbb
/#rrrgggbbb
/rgb(r, g, b)
/rgba(r, g, b, a)
...
For full info, check RGBA
Type: string
Default: #808080
fg_color
Color of the foreground of widget.
Support: #rgb
/#rrggbb
/#rrrgggbbb
/rgb(r, g, b)
/rgba(r, g, b, a)
...
For full info, check RGBA
Type: string
Default: #FFB847
text_transition_ms
Time cost of showing the widget from the edge.
Millisecond.
Type: int
Default: 100
animation_curve
string
enum: ["ease-expo", "ease-cubic", "ease-quat", "linear"]
default "ease-cubic"
radius
Radius of the ring.
Type: int
Default: 13
ring_width
Ring width, should be less than radius.
Type: int
Default: 5
prefix
Text on the left side of the ring.
Currently supported template:
{float:precision,multiply}
- precision:
round()
of a float number, Default2
- multiply: the float number will be multiplied by this number, this happens before
precision
. Default 1.
- precision:
{preset}
, preset content if ur using anypreset
, which means it will be an empty string if u usecustom
.
Type: null | string
Default: null
prefix_hide
Show only when mouse hover.
Type: bool
Default: false
suffix
Text on the right side of the ring.
Currently supported template:
{float:precision,multiply}
- precision:
round()
of a float number, Default2
- multiply: the float number will be multiplied by this number, this happens before
precision
. Default 1.
- precision:
{preset}
, preset content if ur using anypreset
, which means it will be an empty string if u usecustom
.
Type: null | string
Default: null
suffix_hide
Show only when mouse hover.
Type: bool
Default: false
font_family
Font family of all text within ring widget.
Type: null | string
Default: null
for default font
font_size
Type: int
Default: radius * 2
preset
Preset update function of the ring:
can only be ram/swap/cpu/battery/disk/custom
Type: string | object
ram
type*
const `ram`
update_interval
u64
swap
type*
const `swap`
update_interval
u64
cpu
type*
const `cpu`
update_interval
u64
core
which core to should. leave empty to show global usage.
battery
type*
const `battery`
update_interval
u64
disk
type*
const `disk`
partition
Disk partition.
Type: string
Default: /
update_interval
u64
custom
type*
const `custom`
update_interval
u64
cmd
string