diff --git a/.gitignore b/.gitignore index db8564382..1394fe931 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ fastfetch.kdev4 *.user *.user.* *.swp +*.log diff --git a/src/detection/wallpaper/wallpaper_apple.m b/src/detection/wallpaper/wallpaper_apple.m index f4ba8a682..63acae325 100644 --- a/src/detection/wallpaper/wallpaper_apple.m +++ b/src/detection/wallpaper/wallpaper_apple.m @@ -3,9 +3,20 @@ #include "common/apple/osascript.h" #import +#import const char* ffDetectWallpaper(FFstrbuf* result) { + { + // Reliable for user-picked static images. + NSURL* url = [NSWorkspace.sharedWorkspace desktopImageURLForScreen:NSScreen.mainScreen]; + if (url.fileURL && ![url.path isEqualToString:@"/System/Library/CoreServices/DefaultDesktop.heic"] /* dynamic wallpapers */) + { + ffStrbufSetS(result, url.path.UTF8String); + return nullptr; + } + } + { // For Sonoma // https://github.com/JohnCoates/Aerial/issues/1332