Extract bos-settings into its own repo; add Appearance/Startup Apps/Display editors

Split out of the bos repo so a bos-settings release no longer requires a
BOS ISO release (and vice versa) — CI here publishes straight to the
[breadway] pacman repo on tag push, independent of bos's own release cadence.

Also adds real GUI editors for the Hyprland JSON config surfaces bos gained
recently (hypr/settings.json, hypr/monitors.json, hypr/autostart.json):
- Appearance panel: gaps, borders (with a real color picker), blur, shadow,
  tiling layout, and basic input settings.
- Display panel: a monitor-rule list editor alongside the existing live
  connected-monitor readout.
- Startup Apps panel: toggle/edit/add/remove the extra autostart commands.
- --page argv support for deep-linking (breadhelp's guides can now open
  bos-settings straight to a specific page).
- Fixed a stale "View keybinds cheat sheet" button pointing at a file
  deleted when breadhelp replaced bos-keybinds/bos-welcome.
This commit is contained in:
Breadway 2026-07-04 23:31:18 +08:00
parent d0fc16bc84
commit 121e93d273
14 changed files with 1801 additions and 30 deletions

View file

@ -10,7 +10,9 @@ use super::views;
// initial selection, so the two can't independently drift out of sync.
const DEFAULT_PAGE: &str = "about";
pub fn build_ui(app: &Application) {
/// `requested_page` comes from `--page <id>` (e.g. breadhelp's "Learn more"
/// deep links) and overrides `DEFAULT_PAGE` when it names a real page.
pub fn build_ui(app: &Application, requested_page: Option<String>) {
let window = ApplicationWindow::builder()
.application(app)
.title("BOS Settings")
@ -25,7 +27,8 @@ pub fn build_ui(app: &Application) {
hpaned.set_shrink_start_child(false);
hpaned.set_resize_start_child(false);
let (sidebar_box, list) = sidebar::build(DEFAULT_PAGE);
let initial_page = requested_page.as_deref().unwrap_or(DEFAULT_PAGE);
let (sidebar_box, list) = sidebar::build(initial_page);
let stack = Stack::new();
stack.set_hexpand(true);
@ -51,8 +54,10 @@ pub fn build_ui(app: &Application) {
stack.add_named(&views::breadpaper::build(), Some("breadpaper"));
stack.add_named(&views::breadsearch::build(), Some("breadsearch"));
stack.add_named(&views::hyprland::build(), Some("hyprland"));
stack.add_named(&views::appearance::build(), Some("appearance"));
stack.add_named(&views::autostart::build(), Some("autostart"));
stack.set_visible_child_name(DEFAULT_PAGE);
stack.set_visible_child_name(initial_page);
{
let stack = stack.clone();