Join with seperator
This commit is contained in:
parent
35cb20545c
commit
407faab33a
12
src/main.rs
12
src/main.rs
|
@ -28,15 +28,13 @@ fn main() -> ExitCode {
|
||||||
|
|
||||||
pm.init_plugins();
|
pm.init_plugins();
|
||||||
|
|
||||||
let mut buf = String::new();
|
// TODO: Sort them from a config or something
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
buf.clear();
|
let vals: Vec<String> = pm.poll_plugins().into_iter().map(|f| f.1).collect();
|
||||||
let values = pm.poll_plugins();
|
|
||||||
for (_plug_name, val) in values {
|
|
||||||
buf.push_str(val.as_str());
|
let _ = disp.write_display_name(&vals.join(" | "));
|
||||||
}
|
|
||||||
let _ = disp.write_display_name(&buf);
|
|
||||||
std::thread::sleep(Duration::from_millis(250));
|
std::thread::sleep(Duration::from_millis(250));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user