feat: new focused window module

This commit is contained in:
Jake Stanger
2022-08-14 20:40:11 +01:00
parent e416e03b0a
commit dc14cb003f
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();
}
});