tui.addon.dir
tui.addon.dir DIR
Adds a directory whose *.xml files hold addons, so a plugin can ship its own page changes. The app’s own TUI_APP_CONF/addons is always read.
Parameters
DIR: a directory path. A directory that does not exist is ignored.
Notes
- Files are read in name order;
priorityinside each addon decides the order they are applied in. An empty file is a switched-off addon. - Called from a plugin’s
on_enable, the folder is removed again when the plugin is disabled (tui.addon.undir). - Pages already built are not changed. Call
tui.page.refreshto apply the folder to the page on screen.
Example
plugin.stats.on_enable() {
tui.addon.dir "$(tui.plugin.dir stats)/addons"
tui.page.refresh
}
See also: tui.addon.undir, tui.page.refresh
