feat: default login-screen wallpaper

Ship a default wallpaper (blossoms by Nikhil Kumar, Unsplash License) in
a new 0:/os/wallpapers/ directory for OS-provided imagery, staged from
programs/data/wallpapers/. login.elf falls back to
0:/os/wallpapers/default.jpg when the desktop config names no wallpaper
or the configured file cannot be opened. Attribution added to
THIRD-PARTY-NOTICES.txt and man legal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-08 16:05:54 +02:00
parent 16e6482bb0
commit 37c51f31fc
5 changed files with 38 additions and 3 deletions
+6 -2
View File
@@ -8,6 +8,9 @@
namespace {
// Shipped fallback shown when no wallpaper is configured (see NOTICES.txt).
constexpr const char* kDefaultWallpaperPath = "0:/os/wallpapers/default.jpg";
constexpr uint32_t kLoginOverlayAlpha = 0x38;
constexpr uint32_t kLoginOverlayInvAlpha = 255 - kLoginOverlayAlpha;
@@ -23,9 +26,10 @@ bool load_login_wallpaper(LoginState* ls) {
char wp[256];
montauk::strncpy(wp, doc.get_string("wallpaper.path", ""), sizeof(wp));
doc.destroy();
if (wp[0] == '\0') return false;
int fd = montauk::open(wp);
int fd = -1;
if (wp[0] != '\0') fd = montauk::open(wp);
if (fd < 0) fd = montauk::open(kDefaultWallpaperPath);
if (fd < 0) return false;
uint64_t size = montauk::getsize(fd);