diff --git a/dim_plugins/battery/Makefile b/dim_plugins/battery/Makefile index a3c835a..2ec7b8c 100644 --- a/dim_plugins/battery/Makefile +++ b/dim_plugins/battery/Makefile @@ -1,7 +1,7 @@ # Must match package name in Cargo.toml PLUGIN_NAME=battery -# `target` or `debug` -TYPE=target +# `release` or `debug` +TYPE=release build: $(PLUGIN_DIR)/$(PLUGIN_NAME).dim diff --git a/dim_plugins/clock/Cargo.toml b/dim_plugins/clock/Cargo.toml index aa6f772..21b2a21 100644 --- a/dim_plugins/clock/Cargo.toml +++ b/dim_plugins/clock/Cargo.toml @@ -11,3 +11,4 @@ crate-type=["cdylib"] chrono = "0.4.38" dim_sdk = {path="../../sdk/rust/"} lazy_static = "1.4.0" +log = "0.4.21" diff --git a/dim_plugins/clock/Makefile b/dim_plugins/clock/Makefile index 763e2d3..80687d5 100644 --- a/dim_plugins/clock/Makefile +++ b/dim_plugins/clock/Makefile @@ -1,7 +1,7 @@ # Must match package name in Cargo.toml PLUGIN_NAME=clock -# `target` or `debug` -TYPE=target +# `release` or `debug` +TYPE=release build: $(PLUGIN_DIR)/$(PLUGIN_NAME).dim diff --git a/dim_plugins/clock/src/lib.rs b/dim_plugins/clock/src/lib.rs index b1dbff0..9da2601 100644 --- a/dim_plugins/clock/src/lib.rs +++ b/dim_plugins/clock/src/lib.rs @@ -4,7 +4,7 @@ use dim_sdk::{plugin_info, DimPlugin}; plugin_info!( Plug, // Your main global structs name that implements `DimPlugin` - "Clock", // Plugin name + "clock", // Plugin name "0.0.0", // Plugin Version (leave empty for none) "GPLv3" // Plugin license (leave empty for none) ); @@ -26,7 +26,7 @@ impl DimPlugin for Plug { fn poll(&mut self, f: &mut dim_sdk::CBuffer) -> dim_sdk::Result<()> { let local: DateTime = Local::now(); let formatted_time = local.format("%H:%M (%Y-%m-%d)").to_string(); - + log::info!("Hello from clocky :3"); write!(f, "Time: {}", formatted_time)?; Ok(()) } diff --git a/dim_plugins/counter/Makefile b/dim_plugins/counter/Makefile index 99d2764..fc317f4 100644 --- a/dim_plugins/counter/Makefile +++ b/dim_plugins/counter/Makefile @@ -1,7 +1,7 @@ # Must match package name in Cargo.toml PLUGIN_NAME=counter -# `target` or `debug` -TYPE=target +# `release` or `debug` +TYPE=release build: $(PLUGIN_DIR)/$(PLUGIN_NAME).dim diff --git a/dim_plugins/counter/src/lib.rs b/dim_plugins/counter/src/lib.rs index 7d4661b..99049b8 100644 --- a/dim_plugins/counter/src/lib.rs +++ b/dim_plugins/counter/src/lib.rs @@ -21,8 +21,7 @@ impl Plug { } impl DimPlugin for Plug { - fn init(&mut self) { - } + fn init(&mut self) {} fn poll(&mut self, f: &mut dim_sdk::CBuffer) -> dim_sdk::Result<()> { let start_date = NaiveDate::from_ymd_opt(2024, 3, 8).expect("Invalid date"); @@ -32,12 +31,9 @@ impl DimPlugin for Plug { write!(f, "{} days <3", duration.num_days())?; Ok(()) } - fn pre_reload(&mut self) { - } - fn post_reload(&mut self) { - } - fn free(&mut self) { - } + fn pre_reload(&mut self) {} + fn post_reload(&mut self) {} + fn free(&mut self) {} } diff --git a/dim_plugins/example_c/src/main.c b/dim_plugins/example_c/src/main.c index b54b3a8..99eb7bf 100644 --- a/dim_plugins/example_c/src/main.c +++ b/dim_plugins/example_c/src/main.c @@ -4,7 +4,7 @@ #include "dim_sdk.h" -PLUG_INFO("Example plugin", "0.0.1", "GPLv3") +PLUG_INFO("example_c", "0.0.1", "GPLv3") typedef struct plug_t { char* some_data; diff --git a/dim_plugins/example_rust/Makefile b/dim_plugins/example_rust/Makefile index 6de8e64..9e72f6e 100644 --- a/dim_plugins/example_rust/Makefile +++ b/dim_plugins/example_rust/Makefile @@ -1,7 +1,8 @@ # Must match package name in Cargo.toml PLUGIN_NAME=example_rust -# `target` or `debug` -TYPE=target +# `release` or `debug` +TYPE=release + build: $(PLUGIN_DIR)/$(PLUGIN_NAME).dim $(PLUGIN_DIR)/$(PLUGIN_NAME).dim: $(OBJECT_DIR)/$(PLUGIN_NAME)/$(TYPE)/lib$(PLUGIN_NAME).so diff --git a/dim_plugins/example_rust/src/lib.rs b/dim_plugins/example_rust/src/lib.rs index 24769cf..f9a5257 100644 --- a/dim_plugins/example_rust/src/lib.rs +++ b/dim_plugins/example_rust/src/lib.rs @@ -3,7 +3,7 @@ use dim_sdk::{plugin_info, DimPlugin}; plugin_info!( Plug, // Your main global structs name that implements `DimPlugin` - "Example rust project", // Plugin name + "example_rust", // Plugin name "0.0.0", // Plugin Version (leave empty for none) "GPLv3" // Plugin license (leave empty for none) );