Outputs will be functions in a namespace, ex. echo the body | toast -o notification,mail "the message" executes toast_notification "the message" "the body" and toast_mail "the message" "the body".
Configuration file in $XDG_CONFIG_HOME/.toast should be sourced, any plugins should be placed there.
Note: if $XDG_CONFIG_HOME is unset, use ~/.config/(source). Maybe some kind of TOAST_CONFIG override?
In the configuration file, both configuration and user plugins can be kept. Also some kind of override for the --outputs option.
Good ideas for plugins:
notification (current)
mqtt
webhook (to simple to generalize? it might be easier to just write a curl handler)
push (android push, some kind of default provider?)
Each plugin takes care of its own configuration, but its recommended to use the PLUGIN_TOAST_${PLUGIN_NAME}_${CONFIG_KEY} namespace. Ex for plugin mqtt some config might be: PLUGIN_TOAST_MQTT_USERNAME.
Outputs will be functions in a namespace, ex.
echo the body | toast -o notification,mail "the message"
executestoast_notification "the message" "the body"
andtoast_mail "the message" "the body"
.Configuration file in
$XDG_CONFIG_HOME/.toast
should be sourced, any plugins should be placed there.Note: if
$XDG_CONFIG_HOME
is unset, use~/.config/
(source). Maybe some kind ofTOAST_CONFIG
override?In the configuration file, both configuration and user plugins can be kept. Also some kind of override for the
--outputs
option.Good ideas for plugins:
curl
handler)Each plugin takes care of its own configuration, but its recommended to use the
PLUGIN_TOAST_${PLUGIN_NAME}_${CONFIG_KEY}
namespace. Ex for plugin mqtt some config might be:PLUGIN_TOAST_MQTT_USERNAME
.