1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-08-18 07:11:04 +02:00

refactor: move most of the horrible add_module macro content into proper functions

This commit is contained in:
Jake Stanger 2022-12-04 23:23:22 +00:00
parent 490f3f3f65
commit 2c1b2924d4
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
15 changed files with 317 additions and 344 deletions

View file

@ -21,7 +21,7 @@ pub struct ScriptModule {
interval: u64,
#[serde(flatten)]
pub common: CommonConfig,
pub common: Option<CommonConfig>,
}
/// `Mode::Poll`
@ -48,6 +48,10 @@ impl Module<Label> for ScriptModule {
type SendMessage = String;
type ReceiveMessage = ();
fn name() -> &'static str {
"script"
}
fn spawn_controller(
&self,
_info: &ModuleInfo,