diff --git a/data/db-kernel-cachy.json b/data/db-kernel-cachy.json new file mode 100644 index 0000000..6edd25d --- /dev/null +++ b/data/db-kernel-cachy.json @@ -0,0 +1,40 @@ +{ + "latest_version": "6.9.5", + "kernels": [ + { + "name": "CachyOS Default Kernel", + "package": "kernel-cachyos", + "description": "CachyOS Kernel with default scheduler." + }, + { + "name": "CachyOS BORE Kernel", + "package": "kernel-cachyos-bore", + "description": "CachyOS Kernel with Burst-Oriented Response Enhancer\n Scheduler by firelzrd (BORE)." + }, + { + "name": "CachyOS BORE + EEVDF Kernel", + "package": "kernel-cachyos-bore-eevdf", + "description": "CachyOS Kernel with Burst-Oriented Response Enhancer\n Scheduler by firelzrd (BORE) + Earliest Eligible Virtual Deadline (EEVDF)." + }, + { + "name": "CachyOS BORE + EEVDF Kernel (RT)", + "package": "kernel-cachyos-bore-eevdf-rt", + "description": "CachyOS Kernel with Burst-Oriented Response Enhancer\n Scheduler by firelzrd (BORE) + Earliest Eligible Virtual Deadline (EEVDF) with Real-Time compilation." + }, + { + "name": "CachyOS BORE Kernel (LTO)", + "package": "kernel-cachyos-bore-lto", + "description": "CachyOS Kernel with Burst-Oriented Response Enhancer\n Scheduler by firelzrd (BORE) with Link-Time-Optimizations (LTO)." + }, + { + "name": "CachyOS LTS Kernel", + "package": "kernel-cachyos-lts", + "description": "CachyOS Long Term Support Kernel." + }, + { + "name": "CachyOS Kernel (RT)", + "package": "kernel-cachyos-rt", + "description": "CachyOS Kernel with default scheduler and Real-Time compilation." + } + ] +} \ No newline at end of file diff --git a/src/content/mod.rs b/src/content/mod.rs index 62f9282..36ee749 100644 --- a/src/content/mod.rs +++ b/src/content/mod.rs @@ -35,10 +35,27 @@ pub fn content() -> gtk::Box { .orientation(Orientation::Vertical) .build(); + let kernel_branch_expander_row = adw::ExpanderRow::builder() + .build(); + + let kernel_branch_expander_row_boxedlist = gtk::ListBox::builder() + .selection_mode(SelectionMode::None) + .hexpand(true) + .vexpand(true) + .halign(Align::Center) + .margin_start(10) + .margin_end(10) + .margin_bottom(20) + .margin_top(20) + .build(); + kernel_branch_expander_row_boxedlist.add_css_class("boxed-list"); + kernel_branch_expander_row_boxedlist.append(&kernel_branch_expander_row); + create_kernel_badges(&kernel_badge_box, &running_kernel_info); content_box.append(&kernel_badge_box); content_box.append(&tux_icon); + content_box.append(&kernel_branch_expander_row_boxedlist); content_box } @@ -94,7 +111,12 @@ fn create_kernel_badge(label0_text: &str, label1_text: &str, css_style: &str, gr boxedlist } -//fn get_kernel_branches() -> Vec {} +fn get_kernel_branches() -> Vec { + let test_branch = KernelBranch { + name: "kernel-cachy".to_string(), + db: "".to_string() + }; +} fn get_running_kernel_info() -> RunningKernelInfo { let kernel = match Command::new("uname").arg("-r").stdout(Stdio::piped()).output() { Ok(t) => String::from_utf8(t.stdout).unwrap().trim().to_owned(),