ISO structural:
- Move post-install.sh → airootfs/etc/calamares/ (it was never in the squashfs)
- Create airootfs/etc/skel/.config/ with all dotfiles (deploy path now works)
- Add iso/pacman.conf with [breadway] custom repo stub for calamares + bakery
- Add Calamares branding component (bos/branding.desc + show.qml)
- Add missing unpackfs.conf and mount.conf modules
- Add live-session autostart: getty autologin → bash_profile → Hyprland → calamares
- Add polkit rule for wheel-group snapper rollback (pkexec path)
- Remove wlroots from packages (bundled with Hyprland); add bakery to package list
- Fix modules-search path in settings.conf
Dotfiles:
- Rename dotfiles/hyprland/ → dotfiles/hypr/ (Hyprland reads ~/.config/hypr/)
- Fix deprecated shadow options: drop_shadow/shadow_range → shadow { } block
bos-settings Rust:
- Replace glib::MainContext::channel (removed in glib 0.19) with async_channel
- Stream bakery update output line-by-line instead of buffering all at once
- Fix zombie processes: per-package update buttons now wait() in a thread
- Fix sidebar/stack mismatch at startup: select snapshots row to match default view
- Replace deprecated MessageDialog with AlertDialog (GTK 4.10+) throughout
- Use pkexec for snapper rollback so polkit handles privilege escalation
- Add confirmation dialog before delete snapshot (was missing, rollback had one)
- Add refresh button + repopulate after delete in snapshots view
- Add "Saved" / "Error: …" status label to every config view save button
- Add "Remove" buttons to breadbox contexts and breadcrumbs profiles
- Remove hardcoded model string from breadpad defaults
- Drop unused state mod; fix config_dir HOME fallback; fix zombie in editor launches
https://claude.ai/code/session_01WszGHvCmxgcyTwNSkfLF9P
72 lines
2.2 KiB
Rust
72 lines
2.2 KiB
Rust
use gtk4::prelude::*;
|
|
use gtk4::{Box as GBox, Label, ListBox, ListBoxRow, Orientation};
|
|
|
|
pub struct SidebarItem {
|
|
pub id: &'static str,
|
|
pub label: &'static str,
|
|
}
|
|
|
|
pub const APPS_ITEMS: &[SidebarItem] = &[
|
|
SidebarItem { id: "bread", label: "bread" },
|
|
SidebarItem { id: "breadbar", label: "breadbar" },
|
|
SidebarItem { id: "breadbox", label: "breadbox" },
|
|
SidebarItem { id: "breadcrumbs", label: "breadcrumbs" },
|
|
SidebarItem { id: "breadpad", label: "breadpad" },
|
|
];
|
|
|
|
pub const SYSTEM_ITEMS: &[SidebarItem] = &[
|
|
SidebarItem { id: "snapshots", label: "Snapshots" },
|
|
SidebarItem { id: "packages", label: "Packages" },
|
|
SidebarItem { id: "hyprland", label: "Hyprland" },
|
|
];
|
|
|
|
pub fn build() -> (GBox, ListBox) {
|
|
let vbox = GBox::new(Orientation::Vertical, 0);
|
|
vbox.add_css_class("sidebar");
|
|
vbox.set_width_request(190);
|
|
|
|
let list = ListBox::new();
|
|
list.set_selection_mode(gtk4::SelectionMode::Single);
|
|
list.add_css_class("sidebar");
|
|
|
|
append_section(&list, "Apps", APPS_ITEMS);
|
|
append_section(&list, "System", SYSTEM_ITEMS);
|
|
|
|
// Select the snapshots row so it matches the default stack page
|
|
let mut i = 0;
|
|
loop {
|
|
match list.row_at_index(i) {
|
|
None => break,
|
|
Some(row) if row.widget_name() == "snapshots" => {
|
|
list.select_row(Some(&row));
|
|
break;
|
|
}
|
|
_ => i += 1,
|
|
}
|
|
}
|
|
|
|
vbox.append(&list);
|
|
(vbox, list)
|
|
}
|
|
|
|
fn append_section(list: &ListBox, title: &str, items: &[SidebarItem]) {
|
|
let header_row = ListBoxRow::new();
|
|
header_row.set_selectable(false);
|
|
header_row.set_activatable(false);
|
|
let header_lbl = Label::new(Some(title));
|
|
header_lbl.add_css_class("section-header");
|
|
header_lbl.set_xalign(0.0);
|
|
header_row.set_child(Some(&header_lbl));
|
|
list.append(&header_row);
|
|
|
|
for item in items {
|
|
let row = ListBoxRow::new();
|
|
row.set_widget_name(item.id);
|
|
let lbl = Label::new(Some(item.label));
|
|
lbl.set_xalign(0.0);
|
|
lbl.set_margin_top(2);
|
|
lbl.set_margin_bottom(2);
|
|
row.set_child(Some(&lbl));
|
|
list.append(&row);
|
|
}
|
|
}
|