step 8-10: notification daemon (zbus), popup window, SIGHUP theme reload

This commit is contained in:
Breadway 2026-05-17 08:50:08 +08:00
parent f1b471652b
commit 3100ee0591
4 changed files with 195 additions and 1 deletions

View file

@ -99,6 +99,7 @@ impl SimpleComponent for App {
bar::workspaces::spawn_watcher(sender.clone());
bar::clock::spawn_ticker(sender.clone());
bar::stats::spawn_poller(sender);
notifications::spawn();
ComponentParts { model, widgets }
}
@ -138,6 +139,16 @@ impl App {
}
fn main() {
// Reload theme CSS on SIGHUP (e.g. after pywal runs).
relm4::spawn(async {
use tokio::signal::unix::{signal, SignalKind};
let mut stream = signal(SignalKind::hangup()).expect("SIGHUP handler");
loop {
stream.recv().await;
gtk4::glib::MainContext::default().invoke(theme::apply);
}
});
let app = RelmApp::new("sh.breadway.aster");
app.run::<App>(());
}