New network module

This commit is contained in:
2025-05-22 17:49:30 -07:00
parent a2d9c768f8
commit 2be0d56655
3 changed files with 90 additions and 1 deletions

View File

@@ -40,7 +40,6 @@ struct CommandlineArgs {
//
#[derive(Clone)]
struct Unibar {
// acts :UnibarActions
opts: common::AppOptions,
}
@@ -56,6 +55,7 @@ impl Unibar {
let bar_modules_enabled: Vec<Box<dyn bar_modules::BarModuleActions>> = vec! [
Box::new(bar_modules::bar_module_weather::UnibarModuleWeather::new(self.opts.clone())),
Box::new(bar_modules::bar_module_music::UnibarModuleMusic::new(self.opts.clone())),
Box::new(bar_modules::bar_module_network::UnibarModuleNetwork::new(self.opts.clone())),
];
// Get module's part to be displayed in the bar
@@ -82,6 +82,7 @@ impl Unibar {
let bar_modules_debugged: Vec<Box<dyn bar_modules::BarModuleDebug>> = vec! [
Box::new(bar_modules::bar_module_weather::UnibarModuleWeather::new(self.opts.clone())),
Box::new(bar_modules::bar_module_music::UnibarModuleMusic::new(self.opts.clone())),
Box::new(bar_modules::bar_module_network::UnibarModuleNetwork::new(self.opts.clone())),
];
for md in bar_modules_debugged {
md.post_debug();