mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-03 03:31:03 +02:00
feat: support for 'ironvar' dynamic variables
This commit is contained in:
parent
f5bdc5a027
commit
ded50cca6f
17 changed files with 613 additions and 195 deletions
|
@ -1,5 +1,5 @@
|
|||
use crate::config::CommonConfig;
|
||||
use crate::dynamic_string::DynamicString;
|
||||
use crate::dynamic_value::dynamic_string;
|
||||
use crate::modules::{Module, ModuleInfo, ModuleUpdateEvent, ModuleWidget, WidgetContext};
|
||||
use crate::try_send;
|
||||
use color_eyre::Result;
|
||||
|
@ -31,7 +31,7 @@ impl Module<Label> for LabelModule {
|
|||
tx: mpsc::Sender<ModuleUpdateEvent<Self::SendMessage>>,
|
||||
_rx: mpsc::Receiver<Self::ReceiveMessage>,
|
||||
) -> Result<()> {
|
||||
DynamicString::new(&self.label, move |string| {
|
||||
dynamic_string(&self.label, move |string| {
|
||||
try_send!(tx, ModuleUpdateEvent::Update(string));
|
||||
Continue(true)
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue