Box
A Grid Box act as a container for other specific widgets.
Current available elements:
- Ring
- Text
Example:
{
"name": "stats",
"edge": "left",
"layer": "overlay",
"frame_rate": 144,
"widget": {
"type": "box",
"widgets": [
{
"index": [-1, -1],
"widget": {
"frame_rate": 144,
"type": "ring",
"prefix": "RAM ",
"preset": "ram"
}
}
]
}
}
type*
const `box`
frame_rate
Frame rate per second, won't hurt if over screen refresh rate.
Type: int
Default: 60
transition_duration
Time cost of showing the widget from the edge.
Millisecond.
Type: int
Default: 100
extra_trigger_size
Extra mouse event input region of the widget, if 0
then the widget won't be shown by mouse hover.
Type: int | string
Default: 5
gap
Gap between widgets in the grid.
Type: int
Default: 10
widgets
Array of supported widgets and it's position in grid.
Type: array
Default: []
index*
[x, y]
position of the widget in grid, -1
means to append widget to the end of the grid.
Type: [int, int]
widget*
Normal widget item, currently only support Ring
and Text
.
Type: object
outlook
Box style, currently only one: window
.
Type: null | object
Default: null
for default of window
window
type*
const `window`
margins
Tuple of 4 integers, left, top, right, bottom.
Type: [int, int, int, int]
Default: [5,5,5,5]
color
Color of the box window.
Support: #rgb
/#rrggbb
/#rrrgggbbb
/rgb(r, g, b)
/rgba(r, g, b, a)
...
For full info, check RGBA
Type: string
Default: #4d8080
border_radius
Type: int
Default: 5
border_width
Type: int
Default: 15