wallpaper: bundle stock wallpapers and default to geminux-dark.png

This commit is contained in:
Luxferre committed 2026-11-27 18:14:46 +02:00
1 parent 8a7d466655
commit 5472d4273a
9 files changed
+94 -19

No files matched your search

+13
View File
@@ -283,6 +283,14 @@ def main():
assert os.path.isfile(os.path.join(xth_home, ".themes/Geminux-Custom_Test/gtk-3.0/gtk.css"))
wp_hdr = os.path.join(BASE_DIR, "src", "geminux-apps", "geminux-wallpaper.h")
skel_wp_conf = os.path.join(BASE_DIR, "overlay", "rootfs", "etc", "skel", ".config", "geminux", "wallpaper.conf")
assert os.path.isfile(skel_wp_conf), f"Missing default skel wallpaper config: {skel_wp_conf}"
for wp_png in ("geminux-dark.png", "geminux-light.png"):
wp_png_path = os.path.join(BASE_DIR, "artwork", "wallpapers", wp_png)
assert os.path.isfile(wp_png_path), f"Missing bundled wallpaper: {wp_png_path}"
with open(wp_png_path, "rb") as pf:
assert pf.read(8) == b"\x89PNG\r\n\x1a\n", f"Invalid PNG header in {wp_png_path}"
wp_c = os.path.join(tmp, "test_wp.c")
wp_bin = os.path.join(tmp, "test_wp")
wp_dir = os.path.join(tmp, "wp_cfg_dir")
@@ -327,6 +335,10 @@ def main():
' geminux_wp_calc_placement(800, 600, 1600, 1200, GEMINUX_WP_STRETCH, &px, &py, &pw, &ph);\n'
' assert(fabs(px) < 0.01 && fabs(py) < 0.01 && fabs(pw - 1600.0) < 0.01 && fabs(ph - 1200.0) < 0.01);\n'
' geminux_wp_cfg_t cfg, loaded;\n'
f' assert(geminux_wp_cfg_load("{skel_wp_conf}", &loaded));\n'
' assert(loaded.type == GEMINUX_WP_IMAGE && loaded.mode == GEMINUX_WP_FILL);\n'
' assert(strcmp(loaded.path, "/usr/share/geminux/wallpapers/geminux-dark.png") == 0);\n'
' assert(loaded.use_theme_bg);\n'
f' assert(!geminux_wp_cfg_load("{wp_conf}", &loaded));\n'
' geminux_wp_cfg_init(&cfg);\n'
' cfg.type = GEMINUX_WP_IMAGE;\n'
@@ -355,6 +367,7 @@ def main():
wp_help = subprocess.run([wp_script, "--help"], capture_output=True, text=True, check=True)
assert "--restore" in wp_help.stdout and "--apply-wallpaper" not in wp_help.stdout
for srel, needle in (
("overlay/rootfs/usr/bin/geminux-session", "/etc/skel/.config/geminux/wallpaper.conf"),
("overlay/rootfs/usr/bin/geminux-session", "geminux-apply-wallpaper --restore"),
("overlay/rootfs/usr/bin/geminux-apply-theme", "geminux-apply-wallpaper --restore"),
("overlay/rootfs/usr/bin/geminux-launcher", "geminux-themes --wallpaper"),