wofi-widget-builder(3)
πΈ NAME πΈ
wofi β Widget builder API functions π
(oh and hey, this whole thing lives in the manual as wofi-widget-builder(3), just so you know what page you're on, bestie π«Ά)
β¨ DESCRIPTION β¨
okay so listen. the functions documented here are for building custom widgets β and they give you way more power and flexibility than anything that was allowed before. no cap. they're all defined in wofi_widget_builder_api.h π
π struct widget_builder* wofi_widget_builder_init(struct mode* mode, size_t actions)
Creates multiple widget builders. The number of builders created is specified by actions and is returned as an array. it's giving factory energy fr fr πβ¨
struct mode* modeβ Thestruct mode*given to your mode'sinit()function.size_t actionsβ The number of builders to create
π void wofi_widget_builder_set_search_text(struct widget_builder* builder, char* search_text)
Sets the search text for the widget specified by the builder π
struct widget_builder* builderβ The builder that contains the widget to set the search text forchar* search_textβ The text to set as the search text
π void wofi_widget_builder_set_action(struct widget_builder* builder, char* action)
Sets the action for the widget specified by the builder β‘
struct widget_builder* builderβ The builder that contains the widget to set the action forchar* actionβ The text to set as the action
π void wofi_widget_builder_insert_text(struct widget_builder* builder, char* text, ...)
Inserts text into the widget specified by the builder ππ
struct widget_builder* builderβ The builder that contains the widget to add the text tochar* textβ The text to add to the widget...β The names of the CSS classes for this text. The class that will be assigned is.mode_name-css_namewhere mode_name is the name of the mode, i.e.drunetc. This should have aNULLsentinel
π void wofi_widget_builder_insert_text_with_list(struct widget_builder* builder, char* text, struct wl_list* classes)
Inserts text into the widget specified by the builder ππ¦ (same vibe as the one above, just with a whole list instead of vibes-args)
struct widget_builder* builderβ The builder that contains the widget to add the text tochar* textβ The text to add to the widgetstruct wl_list* classesβ The names of the CSS classes for this text. The class that will be assigned is.mode_name-css_namewhere mode_name is the name of the mode, i.e.drunetc. This list should containstruct css_classnodes.
π void wofi_widget_builder_insert_image(struct widget_builder* builder, GdkPixbuf* pixbuf, ...)
Inserts an image into the widget specified by the builder πΌοΈβ¨
struct widget_builder* builderβ The builder that contains the widget to add the image toGdkPixbuf* pixbufβ The image to add to the widget...β The names of the CSS classes for this image. The class that will be assigned is.mode_name-css_namewhere mode_name is the name of the mode, i.e.drunetc. This should have aNULLsentinel
π void wofi_widget_builder_insert_image_with_list(struct widget_builder* builder, GdkPixbuf* pixbuf, struct wl_list* classes)
Inserts an image into the widget specified by the builder πΌοΈπ
struct widget_builder* builderβ The builder that contains the widget to add the image toGdkPixbuf* pixbufβ The image to add to the widgetstruct wl_list* classesβ The names of the CSS classes for this image. The class that will be assigned is.mode_name-css_namewhere mode_name is the name of the mode, i.e.drunetc. This list should containstruct css_classnodes.
π struct widget_builder* wofi_widget_builder_get_idx(struct widget_builder* builder, size_t idx)
Gets the widget_builder at the provided index in the array π―
struct widget_builder* builderβ The array of builders to get the builder fromsize_t idxβ The index in the array to get
π struct widget* wofi_widget_builder_get_widget(struct widget_builder* builder)
Constructs a new widget from the specified builder β the widget can be returned by struct widget* get_widget(void) π
struct widget_builder* builderβ The builder to construct a widget for
π void wofi_widget_builder_free(struct widget_builder* builder)
Frees the specified builder π§Ή (be a good citizen, bestie, free your builders)
struct widget_builder* builderβ The builder to free
and that's the whole page, periodt π this was the wofi-widget-builder(3) page from the Library Functions Manual β go build something iconic with it, you're literally the main character of your own widget tree ππβ¨
π¦ where this page comes from
- alpine 3.24: wofi-doc 1.5.3-r0 Β· GPL-3.0-only
- arch rolling: wofi 1.5.3-1 Β· GPL-3.0-or-later
- debian bookworm: wofi 1.3-1 Β· GPL-3.0-or-later
- debian trixie: wofi 1.4.1-1+b2 Β· GPL-3.0-or-later
- fedora 43: wofi-devel 1.4.1-7.fc43 Β· GPL-3.0-only
- fedora 43: wofi-devel 1.4.1-7.fc43 Β· GPL-3.0-only
- fedora 43: wofi-devel 1.5.3-1.fc43 Β· GPL-3.0-only
- fedora 43: wofi-devel 1.5.3-1.fc43 Β· GPL-3.0-only
- fedora 44: wofi-devel 1.5.3-2.fc44 Β· GPL-3.0-only
- fedora 44: wofi-devel 1.5.3-2.fc44 Β· GPL-3.0-only
- nixos 26.05: wofi 1.5.3
- nixpkgs unstable: wofi 1.5.3
- opensuse-leap 16.0: wofi 1.4.1-bp160.1.13 Β· GPL-3.0-only
- opensuse-leap 16.0: wofi 1.4.1-bp160.1.13 Β· GPL-3.0-only
- opensuse-leap 16.0: wofi 1.4.1-bp160.1.13 Β· GPL-3.0-only
- opensuse-leap 16.0: wofi 1.4.1-bp160.1.13 Β· GPL-3.0-only
- ubuntu noble: wofi 1.4.1-1build2 Β· GPL-3.0-or-later
- ubuntu questing: wofi 1.4.1-1build2
- ubuntu resolute: wofi 1.5.1-1 Β· GPL-3.0-or-later
- ubuntu stonking: wofi 1.5.3-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms