Skip to content

BoxProps

children

table<number, WidgetBatteryProps|WidgetBoxProps|WidgetClockProps|WidgetCpuProps|WidgetIconProps...(+4)>?

An array of components.

Example

children = {
  { Box = {} },
  { Workspace = { halign = "Center", item_height = 22, item_width = 22 } },
  { Clock = { format = "%a %b %u %r", halign = 'End' } },
},

class

(string|table<number, string>)?

Optional css class names. Either space-delimited classes, or an array of class names. Built-in hitokage components will always contain their type as a class name.

Example

class = "red blue green"
or
class = {"red", "blue", "green"}

View gtk4 documentation

halign

('Baseline'|'Center'|'End'|'Fill'|'Start'...(+1))?

Sets the horizontal alignment of widget. Defaults to 'Fill'

View gtk4 documentation

height_request

integer?

Override for height request of the widget. If this is -1, the natural request will be used.

View gtk4 documentation

hexpand

boolean?

Whether to expand horizontally. Defaults to false

View gtk4 documentation

id

string?

A unique identifier.

This is not enforced or checked by hitokage, it is simply used in utility methods such as get_child_by_id.

valign

('Baseline'|'Center'|'End'|'Fill'|'Start'...(+1))?

Sets the vertical alignment of widget. Defaults to 'Fill'.

View gtk4 documentation

vexpand

boolean?

Whether to expand vertically. Defaults to false

View gtk4 documentation

widgets

table<number, WidgetBatteryProps|WidgetBoxProps|WidgetClockProps|WidgetCpuProps|WidgetIconProps...(+4)>?

Danger

Use children instead

Example

widgets = {
  { Box = {} },
  { Workspace = { halign = "Center", item_height = 22, item_width = 22 } },
  { Clock = { format = "%a %b %u %r", halign = 'End' } },
},

width_request

integer?

Override for width request of the widget. If this is -1, the natural request will be used.

View gtk4 documentation