Skip to main content

Category

A category is used to group together items of the same kind (e.g., all CPU-related metrics).
Every Metric and every Action belongs to exactly one category.

See also: Registering Items

Properties

PropertyTypeRestrictionsDescription
IdstringRequired
Length: 1 - 256
Pattern: ^[\w\.\-]+$
The unique identifier of the category.
LabelstringRequired
Length: 1 - 64
The textual label of the category. Longer labels are truncated.
Descriptionstring?Max length: 256An optional textual description of the category.
Iconstring?Length: 1 - 256
Pattern: ^[\w\.\-]+$
An optional icon (the ID of a registered Icon).
SubCategoriesIEnumerable<Category>?Max. 10 subcategoriesAn optional list of subcategories.

Core Categories

Commonly used categories are provided by the SDK as CoreCategory and are automatically registered by MoBro.
Core categories come with predefined labels, descriptions and translations for all languages currently supported by MoBro. They can't be overwritten by a custom category with the same ID.

tip

Prefer core categories over custom categories wherever applicable. This ensures consistent categorization of metrics across all plugins.

CategoryDescription
MiscellaneousFor items that do not fit into any specific category.
BatteryBattery-related items (e.g., capacity).
CpuCPU (processor)-related items (e.g., load, temperature).
GpuGPU (graphics card)-related items (e.g., load, temperature).
MainboardMainboard-related items (e.g., voltage, temperature).
NetworkNetwork-related items (e.g., NICs, download speed).
RamRAM (memory)-related items (e.g., usage, available memory).
StorageStorage-related items (e.g., SSDs, HDDs).
SystemSystem-related items (e.g., operating system, user).
FanFan-related items (e.g., fan speed).
WeatherWeather-related items (e.g., current temperature, weather icon).
MediaMedia-related items (e.g., currently playing media, controls, volume).
ProgramItems related to a specific program.
GameItems related to a specific game.

Custom Categories

Custom categories are created using the MoBroItem.CreateCategory() builder and must be registered before any item references them:

var financeCategory = MoBroItem
.CreateCategory()
.WithId("finance")
.WithLabel("Finances", "Everything related to money")
.WithSubCategory(sub => sub
.WithId("finance_crypto")
.WithLabel("Crypto")
.Build())
.Build();

_mobro.Register(financeCategory);