Extract bos-settings to its own repo; add breadhelp; JSON-driven Hyprland config
bos-settings moves to git.breadway.dev/Breadway/bos-settings (full history preserved via git-filter-repo) so its release cadence is decoupled from BOS's own. breadhelp takes its place as this repo's workspace member: a GTK4 onboarding/help center replacing the old bos-welcome/bos-keybinds bash scripts with searchable guides, an interactive keybind viewer (sourced from the new keybinds.toml, not parsed out of hyprland.lua or hardcoded), a troubleshooting wizard with one-click fixes, and a proper first-run tour. bos-netcheck extracts bos-welcome's network-check half, which still needs to run every login independent of breadhelp's own first-run gating. hyprland.lua's keybinds/settings/monitors/autostart are now JSON-driven (binds.json/settings.json/monitors.json/autostart.json) with every loader pcall-wrapped and falling back to hardcoded defaults per field on bad or missing config, so bread* apps (bos-settings' new editors, and breadhelp's keybind viewer) can read/write this config without ever being able to leave the compositor unable to start. CI's package.yml now builds breadhelp instead of bos-settings on tag push; bos-settings needs its own equivalent workflow in its new repo (not yet set up).
This commit is contained in:
commit
fea8f83204
50 changed files with 2403 additions and 0 deletions
37
src/cli.rs
Normal file
37
src/cli.rs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
//! argv handling for a `HANDLES_COMMAND_LINE` GApplication — every
|
||||
//! invocation (including ones launched while breadhelp is already running,
|
||||
//! forwarded over D-Bus to the primary instance) reaches
|
||||
//! `connect_command_line`, so `--onboard` on a second launch re-triggers the
|
||||
//! tour in the existing window instead of spawning a duplicate.
|
||||
|
||||
#[derive(Clone, Default)]
|
||||
pub struct Action {
|
||||
/// Force-restart the onboarding tour from step 0, regardless of whether
|
||||
/// it was already completed or in progress.
|
||||
pub force_onboard: bool,
|
||||
/// Set by hyprland.lua's every-login autostart entry, as opposed to a
|
||||
/// user explicitly running `breadhelp` or pressing SUPER+/. Lets
|
||||
/// `present()` build the window (so the app is ready to respond the
|
||||
/// instant it's needed) without popping it open when onboarding is
|
||||
/// already done — autostart should only be visible on a genuine first
|
||||
/// run, never on every subsequent login.
|
||||
pub autostart: bool,
|
||||
/// From a breadd Lua module (e.g. `breadhelp-suggest.lua`) reacting to a
|
||||
/// system event. Resolved to banner text by `services::breadd::resolve`.
|
||||
pub suggest: Option<String>,
|
||||
}
|
||||
|
||||
pub fn parse(args: &[std::ffi::OsString]) -> Action {
|
||||
let mut action = Action::default();
|
||||
let mut it = args.iter().skip(1);
|
||||
while let Some(arg) = it.next() {
|
||||
if arg == "--onboard" {
|
||||
action.force_onboard = true;
|
||||
} else if arg == "--autostart" {
|
||||
action.autostart = true;
|
||||
} else if arg == "--suggest" {
|
||||
action.suggest = it.next().and_then(|s| s.to_str()).map(str::to_string);
|
||||
}
|
||||
}
|
||||
action
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue