Fix PMIC/SPM deep-sleep wakeups and backport DE fixes, Anodized theme, and theme editor
- kernel: add 0013-gemini-pmic-wake-and-spm-safety.patch to arm MT6397/MT6351 wake IRQs in late suspend and enable PCM WDT, IM wait, and CNTP backstop on s.sleep - geminux-powerd: distinguish real input/lid-open wakes from spurious open-lid wakes and re-suspend cleanly on battery timer wakes - DE/WM: backport systray (32-bit ARGB, XEmbed race fix, lockscreen stacking), NETWM/EWMH/ICCCM and Wine/DXVK focus fixes, bar drawing fixes, and live Xresources reload across dwm, drw, st, libgemui, geminux-apply-theme, and geminux-session - themes: backport Anodized.xth, geminux-xth.h, and interactive geminux-themes editor/importer (--install), rebuild prebuilt binaries/kernel modules, and update verification scripts
This commit is contained in:
1 parent
f65dbb28a2
commit
6fcc263256
28 files changed
+3802
-355
No files matched your search
@@ -306,7 +306,7 @@ for rel in ("etc/os-release", "usr/lib/os-release", "etc/issue", "etc/motd"):
|
||||
f.write(txt)
|
||||
make_pkg(
|
||||
"geminux-config", pkg_ver,
|
||||
"Geminux system configs, OpenRC units, ALSA UCM2, XKB layout, 21 themes, and udev/power rules",
|
||||
"Geminux system configs, OpenRC units, ALSA UCM2, XKB layout, 22 themes, and udev/power rules",
|
||||
cstage,
|
||||
depends=[
|
||||
f"geminux-kernel-modules=7.3.5-r0",
|
||||
|
||||
@@ -683,6 +683,7 @@ def main():
|
||||
os.path.join(BASE_DIR, "patches", "kernel", "series"): (
|
||||
"0009-mt6797-wlan-drop-free-stability.patch",
|
||||
"0012-gemini-lid-wake-and-fg-taper-fix.patch",
|
||||
"0013-gemini-pmic-wake-and-spm-safety.patch",
|
||||
),
|
||||
os.path.join(overlay_dir, "etc", "profile.d", "10-geminux-env.sh"): (
|
||||
"export NO_AT_BRIDGE=1",
|
||||
|
||||
@@ -42,7 +42,8 @@ def parse_xres(path):
|
||||
|
||||
def main():
|
||||
themes = sorted(glob.glob(os.path.join(THEMES_DIR, "*.xth")))
|
||||
assert len(themes) >= 20, f"Expected >= 20 themes, found {len(themes)}"
|
||||
assert len(themes) >= 22, f"Expected >= 22 themes, found {len(themes)}"
|
||||
assert any(os.path.basename(th) == "Anodized.xth" for th in themes), "Missing Anodized.xth"
|
||||
|
||||
with tempfile.TemporaryDirectory(prefix="geminux-dunst-test-") as tmp:
|
||||
for idx, th in enumerate(themes):
|
||||
@@ -224,7 +225,62 @@ def main():
|
||||
first_name = f"Geminux-{parse_xres(themes[0])['theme.name']}"
|
||||
assert f"color_scheme_path=/home/user/.config/qt6ct/colors/{first_name}.conf" in skel_qt
|
||||
|
||||
print(f"[PASS] Verified {len(themes)} .xth themes, dunst synchronization, and GTK2/3/4/Qt/Tk theme generation")
|
||||
xth_hdr = os.path.join(BASE_DIR, "src", "geminux-apps", "geminux-xth.h")
|
||||
xth_c = os.path.join(tmp, "test_xth.c")
|
||||
xth_bin = os.path.join(tmp, "test_xth")
|
||||
xth_out = os.path.join(tmp, "Custom_Test.xth")
|
||||
imp_dir = os.path.join(tmp, "imp_themes")
|
||||
os.makedirs(imp_dir, exist_ok=True)
|
||||
with open(xth_c, "w", encoding="utf-8") as cf:
|
||||
cf.write(
|
||||
'#include <assert.h>\n'
|
||||
'#include <stdio.h>\n'
|
||||
'#include <string.h>\n'
|
||||
f'#include "{xth_hdr}"\n'
|
||||
'int main(void) {\n'
|
||||
' geminux_xth_t x, y;\n'
|
||||
' geminux_xth_init_anodized(&x);\n'
|
||||
' assert(x.base_font_size == 32 && x.dwm_borderpx == 4 && x.is_dark == 1);\n'
|
||||
' assert(strcmp(x.name, "Anodized") == 0);\n'
|
||||
' snprintf(x.name, sizeof(x.name), "Custom Test");\n'
|
||||
' snprintf(x.colors[GEMINUX_XTH_BG_BAR], 16, "#112233");\n'
|
||||
' geminux_xth_sync_derived(&x);\n'
|
||||
' assert(strcmp(x.colors[GEMINUX_XTH_DWM_NORM_BG], "#112233") == 0);\n'
|
||||
' assert(geminux_xth_contrast_ratio("#ffffff", "#000000") > 20.0);\n'
|
||||
' char clean[64];\n'
|
||||
' geminux_xth_sanitize_name(" My Theme..!! ", clean, sizeof(clean));\n'
|
||||
' assert(strcmp(clean, "My_Theme") == 0);\n'
|
||||
f' assert(geminux_xth_save_file("{xth_out}", &x));\n'
|
||||
f' assert(geminux_xth_load_file("{xth_out}", &y));\n'
|
||||
' assert(y.base_font_size == 32 && y.dwm_borderpx == 4);\n'
|
||||
' assert(strcmp(y.name, "Custom_Test") == 0);\n'
|
||||
' assert(strcmp(y.colors[GEMINUX_XTH_DWM_NORM_BG], "#112233") == 0);\n'
|
||||
' char dest[600];\n'
|
||||
f' assert(geminux_xth_import_file("{xth_out}", "{imp_dir}", "Imported One", dest, sizeof(dest)));\n'
|
||||
' geminux_xth_t z;\n'
|
||||
' assert(geminux_xth_load_file(dest, &z));\n'
|
||||
' assert(strcmp(z.name, "Imported_One") == 0);\n'
|
||||
' return 0;\n'
|
||||
'}\n'
|
||||
)
|
||||
subprocess.run(["cc", "-std=gnu99", "-Wall", "-Wextra", "-Werror", xth_c, "-o", xth_bin, "-lm"], check=True)
|
||||
subprocess.run([xth_bin], check=True)
|
||||
|
||||
saved_vals = parse_xres(xth_out)
|
||||
assert saved_vals.get("Xft.dpi") == "192"
|
||||
assert saved_vals.get("Xcursor.size") == "64"
|
||||
assert saved_vals.get("dwm.borderpx") == "4"
|
||||
assert saved_vals.get("dwm.normbgcolor") == "#112233"
|
||||
xth_home = os.path.join(tmp, "xth_home")
|
||||
os.makedirs(xth_home, exist_ok=True)
|
||||
xth_dunstrc = os.path.join(tmp, "Custom_Test.dunstrc")
|
||||
xth_env = dict(gtk_env, HOME=xth_home, GEMINUX_XRESOURCES=xth_out, GEMINUX_DUNSTRC=xth_dunstrc)
|
||||
subprocess.run([SYNC_SCRIPT, "--no-restart"], env=xth_env, check=True)
|
||||
subprocess.run([GTK_SYNC_SCRIPT, "--no-reload"], env=xth_env, check=True)
|
||||
assert os.path.isfile(xth_dunstrc)
|
||||
assert os.path.isfile(os.path.join(xth_home, ".themes/Geminux-Custom_Test/gtk-3.0/gtk.css"))
|
||||
|
||||
print(f"[PASS] Verified {len(themes)} .xth themes, geminux-xth.h, dunst synchronization, and GTK2/3/4/Qt/Tk theme generation")
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user