breadhelp/Cargo.toml
Breadway 8a1f019b42 breadhelp: add --screenshot CLI mode for automated capture
Three views ("home", "learn", "ask") — one per tab in the Home/Learn/Ask
Stack, switched via the same set_visible_child_name the tab switcher
itself uses, then captured as a full known-size canvas (the window is a
plain top-level, not layer-shell).

Plumbed through breadhelp's own cli::Action/parse() (three more fields,
same shape as force_onboard/autostart/suggest) rather than clap, matching
the app's existing non-clap idiom.

The HANDLES_COMMAND_LINE + thread_local HANDLE singleton architecture
needed one addition beyond the usual NON_UNIQUE-flag fix: every
invocation (including a --screenshot one) normally forwards to the
already-built window over D-Bus and reuses it — worse than the plain
GApplication case in the other apps, since here it's not just "message
the existing instance" but literally switching tabs on and re-capturing
the operator's real, live help-center window. NON_UNIQUE is now set
whenever --screenshot is present in argv (checked before the
Application is even built, since cli::parse() only runs per-invocation
inside connect_command_line).
2026-07-29 11:49:28 +08:00

24 lines
1,010 B
TOML

[package]
name = "breadhelp"
version = "0.2.1"
edition = "2021"
[dependencies]
gtk4 = { version = "0.11", features = ["v4_12"] }
gdk4 = "0.11"
gtk4-layer-shell = "0.8"
glib = "0.22"
# Shared ecosystem theming — same generated stylesheet bos-settings/breadbar/
# breadbox/breadpad load, so this looks like part of the same desktop.
bread-theme = { git = "https://github.com/Breadway/bread-ecosystem", tag = "v0.2.10", features = ["gtk"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.8"
# Non-destructive state editing (mirrors bos-settings/src/config/mod.rs).
toml_edit = "0.22"
async-channel = "2"
bread-utils = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", tag = "v0.3.0", features = ["toml"] }
# Capture primitives for `--screenshot` mode — see src/screenshot.rs. Not
# tag-pinned like the deps above since it doesn't have a tagged release yet.
bread-screenshots = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", branch = "dev" }
anyhow = "1"