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: Set up ipc with unix sockets
|
||||
// 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
|
||||
fn main() -> ExitCode {
|
||||
let ca = CliArgs::parse();
|
||||
|
|
|
@ -40,10 +40,11 @@ impl Plugin {
|
|||
}
|
||||
|
||||
pub fn init(&self, cfg: &Config) {
|
||||
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);
|
||||
|
||||
unsafe {
|
||||
let conf_dir = &cfg.config_dir.join(self.name()).to_string_lossy().to_string();
|
||||
|
||||
let ctx = PluginContextContainer::new(conf_dir);
|
||||
(self.syms().init)(&ctx.inner as *const PluginContext)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user