wallpapers: remove duplicate and postmarketos wallpapers

This commit is contained in:
Luxferre
2026-10-24 21:52:41 +03:00
parent 5646f03ebe
commit 97d031fcb0
8 changed files with 32 additions and 2 deletions
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.
+6 -1
View File
@@ -127,7 +127,12 @@ rm -rf \
"$TARGET_ROOTFS/etc/skel/.config/sxmo/sway" \
"$TARGET_ROOTFS/home/user/.bantam.cfg" \
"$TARGET_ROOTFS/etc/skel/.bantam.cfg" \
"$TARGET_ROOTFS/root/.bantam.cfg"
"$TARGET_ROOTFS/root/.bantam.cfg" \
"$TARGET_ROOTFS/usr/share/wallpapers/postmarketos" \
"$TARGET_ROOTFS/usr/share/wallpapers/postmarketos.jpg" \
"$TARGET_ROOTFS/usr/share/wallpapers/bananarchy.jpg" \
"$TARGET_ROOTFS/usr/share/wallpapers/bananarchy-240x240.png" \
"$TARGET_ROOTFS/usr/share/wallpapers/bananarchy-landscape.png"
mkdir -p "$TARGET_ROOTFS/var/lib/tinydm"
ln -sf /usr/share/xsessions/sxmo.desktop "$TARGET_ROOTFS/var/lib/tinydm/default-session.desktop"
+26 -1
View File
@@ -93,12 +93,37 @@ void scanWallpaperDir(const std::string& dirPath,
for (const auto& name : names) {
if (!isWallpaperExt(name)) continue;
std::string lowerName = toLowerStr(name);
if (lowerName.rfind("postmarketos", 0) == 0 ||
lowerName == "bananarchy-240x240.png" ||
lowerName == "bananarchy-landscape.png") {
continue;
}
std::string fullPath = dirPath + "/" + name;
struct stat st {};
if (::stat(fullPath.c_str(), &st) != 0 || !S_ISREG(st.st_mode)) continue;
std::string disp = prettifyWallpaperName(name);
bool isPng = lowerName.size() >= 4 &&
lowerName.substr(lowerName.size() - 4) == ".png";
bool replacedOrSkipped = false;
for (auto& existing : out) {
if (existing.sourceTag == sourceTag &&
toLowerStr(existing.displayName) == toLowerStr(disp)) {
if (isPng) {
existing.path = fullPath;
existing.displayName = disp;
existing.sizeBytes = st.st_size;
}
replacedOrSkipped = true;
break;
}
}
if (replacedOrSkipped) continue;
WallpaperEntry e;
e.path = fullPath;
e.displayName = prettifyWallpaperName(name);
e.displayName = disp;
e.sourceTag = sourceTag;
e.sizeBytes = st.st_size;
out.push_back(e);