#[main]Expand description
Annotate your main function with this.
- It can optionally take an argument of type
bitbar::Flavor. - It must return a member of the
bitbar::MainOutputtrait. - It can be a
fnor anasync fn. In the latter case,tokio’s threaded runtime will be used. (This requires thetokiofeature, which is on by default.)
The main attribute optionally takes the following parameter:
commandscan be set to a list of subcommand names (in parentheses) which will be used if the binary is called with command-line parameters.fallback_commandcan be set to a function name (in quotes) which will be used if the binary is called with command-line parameters and the first parameter does not match any subcommand.error_template_imagecan be set to a path (relative to the current file) to a PNG file which will be used as the template image for the menu when displaying an error.