mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-03 11:41:04 +02:00
refactor: begin restructuring core code to better encapsulate
This is a first pass towards trying to structure things a bit better, with data generally encapsulated under a single hierarchical tree, rather than lots of globals all over the place. Lots of work is still required. The plan is that with this and some more work, #291 should become a lot easier to sort.
This commit is contained in:
parent
08e354e019
commit
b2fa19ab6c
14 changed files with 490 additions and 415 deletions
|
@ -1,6 +1,6 @@
|
|||
#[cfg(feature = "ipc")]
|
||||
use crate::ironvar::get_variable_manager;
|
||||
use crate::script::{OutputStream, Script};
|
||||
#[cfg(feature = "ipc")]
|
||||
use crate::Ironbar;
|
||||
use crate::{arc_mut, lock, send};
|
||||
use gtk::prelude::*;
|
||||
use tokio::spawn;
|
||||
|
@ -72,7 +72,7 @@ where
|
|||
lock!(label_parts).push(String::new());
|
||||
|
||||
spawn(async move {
|
||||
let variable_manager = get_variable_manager();
|
||||
let variable_manager = Ironbar::variable_manager();
|
||||
let mut rx = crate::write_lock!(variable_manager).subscribe(name);
|
||||
|
||||
while let Ok(value) = rx.recv().await {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue