Refactor theme onto bread-theme; add bakery.toml and release workflow
- Cargo.toml: depend on bread-theme (path dep for local dev, git dep for production) with gtk feature; remove local theme dependencies - src/theme.rs: replace local pywal/Catppuccin impl with bread_theme::gtk helpers; local bar-specific CSS is preserved - bakery.toml: describes breadbar for bakery install - release.yml: builds on hestia self-hosted runner, publishes binary to dl.breadway.dev and GitHub Releases on v* tags
This commit is contained in:
parent
4a3604f78a
commit
4b66efa87c
8 changed files with 456 additions and 114 deletions
|
|
@ -6,6 +6,7 @@ macro_rules! asset {
|
|||
|
||||
mod bar;
|
||||
mod notifications;
|
||||
mod osd;
|
||||
mod theme;
|
||||
|
||||
use gtk4::prelude::*;
|
||||
|
|
@ -185,6 +186,7 @@ impl SimpleComponent for App {
|
|||
bar::clock::spawn_ticker(sender.clone());
|
||||
bar::stats::spawn_poller(sender);
|
||||
notifications::spawn();
|
||||
osd::spawn();
|
||||
|
||||
ComponentParts { model, widgets }
|
||||
}
|
||||
|
|
@ -255,9 +257,10 @@ fn stat_pair(icon_path: &str, label: >k4::Label) -> gtk4::Box {
|
|||
}
|
||||
|
||||
fn svg_texture(path: &str) -> gtk4::gdk::Texture {
|
||||
let fg = theme::fg_color();
|
||||
let svg = std::fs::read_to_string(path)
|
||||
.unwrap_or_default()
|
||||
.replace("currentColor", "white")
|
||||
.replace("currentColor", &fg)
|
||||
.replace(r#"width="24" height="24""#, r#"width="16" height="16""#);
|
||||
let bytes = gtk4::glib::Bytes::from_owned(svg.into_bytes());
|
||||
gtk4::gdk::Texture::from_bytes(&bytes).expect("svg load")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue