1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-01 18:51:04 +02:00

refactor: tidy and format

This commit is contained in:
Jake Stanger 2022-10-10 21:59:44 +01:00
parent b1c66b9117
commit 5ce50b0987
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
10 changed files with 73 additions and 126 deletions

View file

@ -1,5 +1,5 @@
use crate::modules::{Module, ModuleInfo, ModuleUpdateEvent, ModuleWidget, WidgetContext};
use crate::wayland::{ToplevelChange};
use crate::wayland::ToplevelChange;
use crate::{await_sync, icon, wayland};
use color_eyre::Result;
use glib::Continue;
@ -51,10 +51,7 @@ impl Module<gtk::Box> for FocusedModule {
});
if let Some((top, _)) = focused {
tx.try_send(ModuleUpdateEvent::Update((
top.title.clone(),
top.app_id
)))?;
tx.try_send(ModuleUpdateEvent::Update((top.title.clone(), top.app_id)))?;
}
spawn(async move {
@ -67,7 +64,7 @@ impl Module<gtk::Box> for FocusedModule {
let update = match event.change {
ToplevelChange::Focus(focus) => focus,
ToplevelChange::Title(_) => event.toplevel.active,
_ => false
_ => false,
};
if update {