mczachurski / wallpapper

:computer: Console application for creating dynamic wallpapers for macOS Mojave and newer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to get dynamic wallpapers to work due to dropdown issues

jbbudzon opened this issue · comments

It is somewhat Working As Designed that the dropdown shows corrupted looking entries. In general, this seems not to effect the use of dynamic wallpapers. And, this issue does not seem specific to Wallpapper.

However, I seem to have gotten into a conundrum. Luckily, others have ran into the issue I am seeing as well. And so, a solution was available to work around the problem.

It appears that, in certain edge cases, you may run into an issue where the dropdown defaults to "Dark Mode (static)" in the backend and since the dropdown is not functional "Dynamic" cannot be selected (even if "Fit to Screen" is selected). The result is that it ends up being impossible to get the heic to behave "dynamically".

After some research online, I stumbled upon a solution involving a program called Dynaper. It provides a utility feature that will "strip" the static images from the heic file. When I run a Wallpapper generated heic through Dynaper, the exported heic shows a mostly proper dropdown. But more importantly, this also seems to get OSX to "default" to the proper "Dynamic" entry, which allows me to get a wallpaper generated by Wallpapper to work (this was verified with console.app). Presumably, this is because now "Dynamic" is the only option available in the dropdown (even though it displays as "Fit to Screen").

I dug a little bit into the Wallpapper code, looking for how isForLight is used. But, after tracing through the code it didn't take me anywhere definitive.

I wonder if it might be possible to provide a way to "strip" the static images, like Dynaper, if the end user requests it. In my case, it would allow me to avoid using Dynaper entirely and I could stick with a full Wallpapper solution.

If I could even be pointed in the proper direction for a PR, I'm down 😉

Hi. Great investigation. I prepared new version (1.5.1) of wallpapper where you can "strip" static images. You have to use JSON like that:

[
  {
    "fileName": "1.png",
    "isPrimary": true,
    "altitude": 27.95,
    "azimuth": 279.66
  },
  {
    "fileName": "2.png",
    "altitude": -31.05,
    "azimuth": 4.16
  },
  {
    "fileName": "3.png",
    "altitude": -26.10,
    "azimuth": 27.03
  },
  {
    "fileName": "4.png",
    "altitude": -15.23,
    "azimuth": 45.83
  },
  {
    "fileName": "5.png",
    "altitude": 0.05,
    "azimuth": 60.58
  },
  {
    "fileName": "6.png",
    "altitude": 16.31,
    "azimuth": 72.80
  },
  {
    "fileName": "7.png",
    "altitude": 34.16,
    "azimuth": 84.31
  },
  {
    "fileName": "8.png",
    "altitude": 52.38,
    "azimuth": 97.87
  },
  {
    "fileName": "9.png",
    "altitude": 69.59,
    "azimuth": 122.59
  },
  {
    "fileName": "10.png",
    "altitude": 77.09,
    "azimuth": 196.03
  },
  {
    "fileName": "10.png",
    "altitude": 64.00,
    "azimuth": 248.53
  },
  {
    "fileName": "10.png",
    "altitude": 46.15,
    "azimuth": 267.27
  },
  {
    "fileName": "10.png",
    "altitude": 10.41,
    "azimuth": 291.18
  },
  {
    "fileName": "14.png",
    "altitude": -5.95,
    "azimuth": 304.07
  },
  {
    "fileName": "15.png",
    "altitude": -19.51,
    "azimuth": 320.06
  },
  {
    "fileName": "16.png",
    "altitude": -28.63,
    "azimuth": 340.41
  }
]

Thus you don't have to provide isForLight or isForDark at all and then information about static images (Appearance) is not added to the output file.

I looked at the changes just to learn a thing or two. Makes sense!
Just pulled down the latest version and tested it. Worked like a charm!! Thanks so much for your work 😄