more todos and create config dir per plugin
This commit is contained in:
parent
7f6920507c
commit
8349316169
|
@ -26,6 +26,7 @@ pub type c_str = *const c_char;
|
||||||
// TODO: Make ffi safe abstraction for logger
|
// TODO: Make ffi safe abstraction for logger
|
||||||
// TODO: Set up ipc with unix sockets
|
// TODO: Set up ipc with unix sockets
|
||||||
// TODO: Allow sending messages command -> running DIM instance -> plugin with ipc
|
// TODO: Allow sending messages command -> running DIM instance -> plugin with ipc
|
||||||
|
// TODO: Clickable bar: https://dwm.suckless.org/patches/statuscmd/
|
||||||
// TODO: Run code through clippy
|
// TODO: Run code through clippy
|
||||||
fn main() -> ExitCode {
|
fn main() -> ExitCode {
|
||||||
let ca = CliArgs::parse();
|
let ca = CliArgs::parse();
|
||||||
|
|
|
@ -40,10 +40,11 @@ impl Plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn init(&self, cfg: &Config) {
|
pub fn init(&self, cfg: &Config) {
|
||||||
unsafe {
|
|
||||||
let conf_dir = &cfg.config_dir.join(self.name()).to_string_lossy().to_string();
|
let conf_dir = &cfg.config_dir.join(self.name()).to_string_lossy().to_string();
|
||||||
|
let _ = std::fs::create_dir(&conf_dir); // dont care
|
||||||
let ctx = PluginContextContainer::new(conf_dir);
|
let ctx = PluginContextContainer::new(conf_dir);
|
||||||
|
|
||||||
|
unsafe {
|
||||||
(self.syms().init)(&ctx.inner as *const PluginContext)
|
(self.syms().init)(&ctx.inner as *const PluginContext)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user