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

feat: new focused window module

This commit is contained in:
Jake Stanger 2022-08-14 20:40:11 +01:00
parent e416e03b0a
commit dc14cb003f
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
13 changed files with 222 additions and 88 deletions

View file

@ -93,7 +93,12 @@ impl Module<Button> for MpdModule {
let (ui_tx, mut ui_rx) = mpsc::channel(32);
let popup = Popup::new("popup-mpd", info.app, Orientation::Horizontal, info.bar_position);
let popup = Popup::new(
"popup-mpd",
info.app,
Orientation::Horizontal,
info.bar_position,
);
let mpd_popup = MpdPopup::new(popup, ui_tx);
let (tx, rx) = glib::MainContext::channel(glib::PRIORITY_DEFAULT);
@ -148,11 +153,12 @@ impl Module<Button> for MpdModule {
match status.state {
PlayState::Playing => client.command(commands::SetPause(true)).await,
PlayState::Paused => client.command(commands::SetPause(false)).await,
PlayState::Stopped => Ok(())
PlayState::Stopped => Ok(()),
}
}
PopupEvent::Next => client.command(commands::Next).await
}.unwrap();
PopupEvent::Next => client.command(commands::Next).await,
}
.unwrap();
}
});