Skip to content

Exec Components

Exec popovers are component trees. Raw protocol applets send them in popover messages, and SDK applets build the same tree through typed helpers.

Each node has this shape:

json
{"type":"section","data":{"title":"System","children":[]}}
FieldMeaning
typeComponent name.
dataComponent fields. The expected fields depend on type.

Only the component names listed below are valid exec protocol widgets. Internal GTK component names such as action_row and action_menu are not protocol types; use action_item, section, button, menu_button, row, or column instead.

Common Component Fields

Most popover components accept these fields:

FieldDefaultValuesMeaning
idunsetstringRequired for interactive components. Used in events.
visibleunset, treated as visiblebooleanHide or show the component.
hexpand / vexpandunset, treated as falsebooleanLet the component take extra space.
halign / valignunsetfill, start, end, center, baselineAlignment.
tooltipunsetstringHover text.
variantunset, treated as normalnormal, muted, accent, success, warning, dangerVisual emphasis.

Layout Components

ComponentDefault fieldsUse it for
sectiontitle = "", subtitle = "", children = []A titled group.
cardchildren = []A framed group.
rowspacing = 0, children = []Horizontal layout.
columnspacing = 0, children = []Vertical layout.
boxspacing = 0, children = []Explicit horizontal or vertical layout. Requires orientation.
gridrow_spacing = 0, column_spacing = 0, children = []Two-dimensional layout.
scrollno default childScrollable content. Requires child.
overlayoverlays = []; requires childStack render-only overlay nodes above a base child.
list_boxchildren = []GTK list with one row per child.
expanderexpanded = false; requires label, childCollapsible disclosure container backed by gtk::Expander.
tree_expanderhide_expander = false, indent_for_depth = false, indent_for_icon = false; requires childGTK tree expander wrapper around one child.
separatororientation = unsetVisual divider.

Grid children use:

json
{"row":0,"column":0,"width":1,"height":1,"child":{"type":"label","data":{"text":"CPU"}}}

Display Components

ComponentDefault fieldsUse it for
herosubtitle = "", icon = unset; requires titleBig header for a popover.
property_listtitle = "", rows = []Key/value facts.
itemicon = "", sublabel = "", right = unset; requires labelDisplay-only row with an optional right-side component.
action_itemicon = "", sublabel = "", right = unset, enabled = true; requires id, labelClickable row with an optional render-only right-side component.
empty_statesubtitle = ""; requires titleFriendly empty message.
badgerequires labelSmall pill label.
statuscommon fields onlySmall status marker.
metericon = unset, label = "", min = 0, max = 1, step = 0.01, text = unset, interactive = false; requires valueProgress row or slider row.
progressmax = 1, show_text = false, text = unset; requires valueProgress bar.
level_barmin = 0, max = 1, mode = continuous; requires valueNative GTK level indicator. Modes: continuous, discrete.
copyablelabel = ""; requires valueText row with copy action.
spinnerspinning = trueLoading indicator.
labelwrap = false, xalign = unset, selectable = false; requires textText.
iconpixel_size = unset; requires iconSymbolic icon.
imagepixel_size = unset; requires iconImage from icon name or path.
picturecontent_fit = contain; requires pathImage file rendered with gtk::Picture. Fits: fill, contain, cover, scale_down.
buttonlabel = unset, icon = unset, enabled = true, variant = flat; requires id for eventsButton. icon is an icon-name string. Variants: primary, secondary, compact, flat, danger.
link_buttonlabel = unset; requires uriLink-style button that opens a URI through GTK. Does not emit applet events.
menu_buttonlabel = unset, icon = unset; requires popoverButton that opens a rendered popover child. The button itself does not emit applet events.
switchlabel = unset, active = false; requires idToggle switch.
toggle_buttonlabel = unset, active = false; requires idButton-like toggle that emits toggle events.
checkboxlabel = unset, active = false; requires idCheckbox.
sliderorientation = unset, draw_value = false; requires id, min, max, step, valueSlider.
selectitems = [], selected = unset; requires idSelect control.

Button

Use button for explicit commands. Buttons do not accept child widgets or menu actions.

txt
popover {"root":{"type":"button","data":{"id":"refresh","label":"Refresh","icon":"view-refresh-symbolic","variant":"primary"}}}

Use link_button for external documentation or support links. It opens the URI directly through GTK and does not send an applet event.

txt
popover {"root":{"type":"link_button","data":{"uri":"https://example.com/docs","label":"Docs"}}}

Expander

Use expander for optional detail content that should stay in the same popover.

txt
popover {"root":{"type":"expander","data":{"label":"Details","expanded":true,"child":{"type":"label","data":{"text":"More"}}}}}

Tree Expander

Use tree_expander for a GTK tree expander wrapper around a child node.

txt
popover {"root":{"type":"tree_expander","data":{"child":{"type":"label","data":{"text":"Nested"}},"hide_expander":true,"indent_for_depth":true,"indent_for_icon":true}}}

Use menu_button for compact controls that open rendered popover content. Controls inside the nested popover node still emit their own events.

txt
popover {"root":{"type":"menu_button","data":{"label":"More","icon":"open-menu-symbolic","popover":{"type":"label","data":{"text":"Menu content"}}}}}

Overlay

Use overlay to render badges or other status affordances above a base component.

txt
popover {"root":{"type":"overlay","data":{"child":{"type":"picture","data":{"path":"/home/me/.cache/avatar.png","content_fit":"cover"}},"overlays":[{"type":"badge","data":{"label":"Live","halign":"end","valign":"start"}}]}}}

List Box

Use list_box for native GTK list rows. Each child is rendered inside its own row.

txt
popover {"root":{"type":"list_box","data":{"children":[{"type":"label","data":{"text":"First"}},{"type":"badge","data":{"label":"Second"}}]}}}

Level Bar

Use level_bar for native GTK level indicators.

txt
popover {"root":{"type":"level_bar","data":{"value":0.7,"min":0,"max":1,"mode":"continuous"}}}

See Also

PageCovers
Exec AppletApplet config and options.
Line ProtocolRaw protocol commands, message shapes, and events.
Exec SDKSDK installation and language examples.