From 93377de7e403b00723445980a8da483d8caeda71 Mon Sep 17 00:00:00 2001 From: kitzsh <110337474+kitzsh@users.noreply.github.com> Date: Mon, 16 Feb 2026 11:57:31 +1100 Subject: [PATCH 1/5] Force X11 and disable compositing mode on Wayland --- src-tauri/src/main.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 5e3a5ac..a20306e 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -1,6 +1,22 @@ // Prevents additional console window on Windows in release, DO NOT REMOVE!! #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] +#[cfg(target_os = "linux")] +fn force_x11() { + if let Ok(val) = std::env::var("GDK_BACKEND") { + if val == "wayland" { + // SAFETY: There is no other thread where this is ran. + unsafe { + std::env::set_var("GDK_BACKEND", "x11"); + std::env::set_var("WEBKIT_DISABLE_COMPOSITING_MODE", "1"); + } + } + } +} + fn main() { + #[cfg(target_os = "linux")] + force_x11(); + modfriend_lib::run() } From a701bf73358123676140375972502bbee3a44853 Mon Sep 17 00:00:00 2001 From: kitzsh <110337474+kitzsh@users.noreply.github.com> Date: Mon, 16 Feb 2026 15:15:55 +1100 Subject: [PATCH 2/5] Use __NV_DISABLE_EXPLICIT_SYNC instead of the X11 method --- src-tauri/src/main.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index a20306e..ccf85a9 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -2,13 +2,12 @@ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] #[cfg(target_os = "linux")] -fn force_x11() { +fn fix_nvidia() { if let Ok(val) = std::env::var("GDK_BACKEND") { if val == "wayland" { // SAFETY: There is no other thread where this is ran. unsafe { - std::env::set_var("GDK_BACKEND", "x11"); - std::env::set_var("WEBKIT_DISABLE_COMPOSITING_MODE", "1"); + std::env::set_var("__NV_DISABLE_EXPLICIT_SYNC", "1"); } } } @@ -16,7 +15,7 @@ fn force_x11() { fn main() { #[cfg(target_os = "linux")] - force_x11(); + fix_nvidia(); modfriend_lib::run() } From 0b06272e8dedcab501d0cd6b49a86c2629bc9eac Mon Sep 17 00:00:00 2001 From: kitzsh <110337474+kitzsh@users.noreply.github.com> Date: Tue, 24 Feb 2026 13:21:10 +1100 Subject: [PATCH 3/5] Set WEBKIT_DISABLE_COMPOSITING_MODE when using X11 --- src-tauri/src/main.rs | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index ccf85a9..88190d0 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -1,15 +1,24 @@ // Prevents additional console window on Windows in release, DO NOT REMOVE!! #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] +// Automatically sets environment variables to work around issues with WebKitGTK on NVIDIA cards. +// When running in Wayland, it sets __NV_DISABLE_EXPLICIT_SYNC to 1 +// When running in X11, it sets WEBKIT_DISABLE_COMPOSITING_MODE to 1 #[cfg(target_os = "linux")] fn fix_nvidia() { - if let Ok(val) = std::env::var("GDK_BACKEND") { - if val == "wayland" { - // SAFETY: There is no other thread where this is ran. - unsafe { - std::env::set_var("__NV_DISABLE_EXPLICIT_SYNC", "1"); + let variable = match std::env::var("GDK_BACKEND") { + Ok(val) => { + match val.as_str() { + "wayland" => "__NV_DISABLE_EXPLICIT_SYNC", + _ => "WEBKIT_DISABLE_COMPOSITING_MODE" // if GDK_BACKEND is not "wayland", assume X11 is in use } - } + }, + Err(_) => "WEBKIT_DISABLE_COMPOSITING_MODE" // if GDK_BACKEND is blank, assume X11 is in use + }; + + // SAFETY: There is no other thread where this is ran. + unsafe { + std::env::set_var(variable, "1"); } } From 6047ad7abbc77411691770ca1e05e8342e01f153 Mon Sep 17 00:00:00 2001 From: Frakits <90983918+Frakits@users.noreply.github.com> Date: Sat, 21 Mar 2026 16:59:30 +0200 Subject: [PATCH 4/5] 2 widgets WIP --- src/main.css | 5 + src/views/Library.vue | 543 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 548 insertions(+) create mode 100644 src/views/Library.vue diff --git a/src/main.css b/src/main.css index ded27d9..6c5a8fb 100644 --- a/src/main.css +++ b/src/main.css @@ -95,4 +95,9 @@ .panel-secondary { @apply bg-bg-primary/50 rounded-xl overflow-hidden; } + #widget { + /* TODO: stylize this properly */ + background: darkgray; + border: thick solid black; + } } diff --git a/src/views/Library.vue b/src/views/Library.vue new file mode 100644 index 0000000..2216023 --- /dev/null +++ b/src/views/Library.vue @@ -0,0 +1,543 @@ + + +