Join with seperator

This commit is contained in:
Gvidas Juknevičius 2024-06-14 18:30:04 +03:00
parent 35cb20545c
commit 407faab33a
Signed by: MCorange
GPG Key ID: 12B1346D720B7FBB

View File

@ -28,15 +28,13 @@ fn main() -> ExitCode {
pm.init_plugins();
let mut buf = String::new();
// TODO: Sort them from a config or something
loop {
buf.clear();
let values = pm.poll_plugins();
for (_plug_name, val) in values {
buf.push_str(val.as_str());
}
let _ = disp.write_display_name(&buf);
let vals: Vec<String> = pm.poll_plugins().into_iter().map(|f| f.1).collect();
let _ = disp.write_display_name(&vals.join(" | "));
std::thread::sleep(Duration::from_millis(250));
}
}