StephenGregory / google-music-desktop-wallpapers

Generate wallpapers from your hot jams

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow automatically setting wallpaper

StephenGregory opened this issue · comments

Ideally, when the app is closed it would reset the wallpaper settings to whatever the user had it set to last time, but I'm not sure how practical this is for multiple monitors.

For mac, if a wallpaper is set to a particular image path and the contents of the file changes, you cannot subsequently set it to the same path and expect your wallpaper to change. You'll have to set it to a new path, then the old path, for your change to be reflected.

I could switch to generating wallpapers with unique names. In #3 I could then add a disclaimer that the name must be unique, otherwise updating the wallpaper is not possibly on subsequent attempts.

wallpaper (uses binary from macos-wallpaper) and wallpaper-macos do not seem to work.

I have been able to get this working for Mac using AppleScript.

Wallpapers on mac can only be changed if the new path is unique and if the desktop does not have wallpaper rotation enabled. Currently, I have it written such that it only updates desktops when these conditions are met.

Remaining:

  • Set on all spaces. Currently just sets on visible space. [Not sure if this is possible]
  • provide option to force wallpaper to be set on all desktops?
  • restore wallpaper settings on closure
    • handle if number of desktops change during usage
      • one desktop when started, multiple desktops when stopped
      • multiple desktops when started, one desktop when stopped [Not sure if this is possible]
  • restore wallpaper settings whenever program:
    • closes due to uncaught exception
    • closes due to user stops the program
    • loses connectivity to the desktop player after x attempts of reconnecting.

Without knowing how to access wallpapers of spaces not on the screen, I'm not sure that I want to implement restoring wallpapers when it would only restore the visible spaces.

I'm also thinking forcing wallpaper to be set could be introduced in latter PR.