M2: terminal UI (ratatui)
- layout: header, top menu (quicklook, cpu, mem, swap, load), left sidebar, process list and alert footer - decorations/colors, bars, per-plugin render implementations - hotkeys: quit, help, modes, sorting, cursor, nice, kill, filters, toggles - TestBackend layout test
This commit is contained in:
@@ -54,9 +54,20 @@ impl Engine {
|
||||
let mut engine = Self { args, config, runtime, plugins };
|
||||
engine.apply_plugin_options();
|
||||
engine.apply_process_options();
|
||||
engine.sync_enabled();
|
||||
engine
|
||||
}
|
||||
|
||||
/// Refresh the runtime set of enabled plugins.
|
||||
pub fn sync_enabled(&mut self) {
|
||||
self.runtime.enabled_plugins = self
|
||||
.plugins
|
||||
.iter()
|
||||
.filter(|(_, plugin)| plugin.is_enabled())
|
||||
.map(|(name, _)| name.clone())
|
||||
.collect();
|
||||
}
|
||||
|
||||
fn apply_plugin_options(&mut self) {
|
||||
// Disable plugins from the configuration file.
|
||||
for section in self.config.sections() {
|
||||
|
||||
Reference in New Issue
Block a user