Optimize shell startup and include demo artwork

This commit is contained in:
Samuel Onoja committed 2026-09-26 05:22:38 +01:00
1 parent 2f8ba908a5
commit 956c739940
3 files changed
+20 -6

No files matched your search

+9 -3
View File
@@ -159,9 +159,9 @@ The shell provides an edge-to-edge libcosmic menu bar backed
by the private shell-control connection. Build and preview it nested with:
```bash
cargo build -p ferese -p ferese-shell
target/debug/ferese --backend nested --grant-effects --grant-shell-control -- \
target/debug/ferese-shell
cargo build --release -p ferese -p ferese-shell
target/release/ferese --backend nested --grant-effects --grant-shell-control -- \
target/release/ferese-shell
```
The Ferese mark enters overview, where workspace indicators become available.
@@ -171,6 +171,12 @@ shadow. Window spacing uses the workspace outer gap; `top_bar_window_gap` under
`[theme.geometry]` adds optional extra space (default 0). Solid and translucent
shell surfaces also omit outlines. The dark startup fallback matches the material palette.
The shell decodes wallpaper in parallel with startup and prefers the lightweight
software renderer, with GPU rendering available as a fallback. Glass effects
still run on the compositor GPU. Set `ICED_BACKEND=wgpu` to explicitly use GPU
rendering for shell content. Use release builds when evaluating startup and
animation performance; debug image processing is considerably slower.
Keyboard and direct-session touchpad settings are applied at startup:
```toml
+2 -2
View File
@@ -8,8 +8,8 @@ rust-version = "1.93"
[dependencies]
ferese-protocols = { path = "../../crates/ferese-protocols", default-features = false, features = ["client"] }
jiff.workspace = true
# Wallpaper resampling must not block the bar on iced's shared UI thread.
# Keep tiny-skia available as libcosmic's fallback, but prefer GPU rendering.
# Keep GPU rendering available as a fallback/override. The shell defaults to
# tiny-skia to avoid a second GPU initialization during desktop startup.
libcosmic = { workspace = true, features = ["wgpu"] }
serde.workspace = true
toml.workspace = true
+9 -1
View File
@@ -79,6 +79,13 @@ impl From<ShellTheme> for BarMetrics {
}
fn main() -> cosmic::iced::Result {
// Small shell surfaces do not need a second GPU device and shader setup.
// Keep wgpu as a fallback and honor an explicit renderer preference.
if std::env::var_os("ICED_BACKEND").is_none() {
// SAFETY: this is the process entry point, before any worker or
// toolkit threads are started.
unsafe { std::env::set_var("ICED_BACKEND", "tiny-skia,wgpu") };
}
let config = config::load();
// Decode alongside toolkit/GPU initialization, never during a UI draw.
let wallpaper = config.wallpaper.path.clone().map(|path| {
@@ -227,7 +234,8 @@ impl cosmic::Application for FereseShell {
Some(Box::new(Self::view_layer)),
);
let tasks = [wallpaper_action, bar_action]
// Submit the small interactive surface before the full-screen image.
let tasks = [bar_action, wallpaper_action]
.map(cosmic::Action::Surface)
.map(cosmic::task::message);