You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've written (well, ported) a program that procedurally generates tiled wallpapers (not yet in npm), using the wallpaper module to optionally set it as the desktop background. A straightforward method of use would seem to be to keep invoking it to generate a new background at the same location, and then reset the wallpaper. However, the Mac OS wallpaper CLI tool doesn't allow for this mode of use, as after the first invocation, further invocations after image regenerations have no effect on the desktop background.
To be clear, this is the sort of thing I'm talking about:
Obviously, this is an artifact of the way that setDesktopImageUrl works, and not anything macos-wallpaper is doing per se... but of course users shouldn't have to be bothered with how the underlying mechanisms of the tool (or module) work - it should "just work" according to the most straightforward user expectations.
Not sure the best way to go about this. I assume there's some way to send a message to Dock to reload the wallpaper, but judging from discussion on #13 the right way to do this isn't currently known. Perhaps just flushing the setting to, I dunno, /dev/null, and then to the user-supplied argument? This probably produces an annoying sort of "flash", but it could be mitigated by only doing this if the new argument matches the pre-existing value in the db.
Obviously, my app, and other consumers of the wallpaper npm module, could just do this ourselves, instead of asking macos-wallpaper to fix it; but fixing it in one place instead of working around it in many others seems the more ideal solution.
Another point to consider is consistency across platforms - what do the Windows or Linux implementations of the wallpaper module do when they receive the same path twice (but with different actual image files)? If they behave differently than the Mac OS version, then unification would seem a good idea.
However, if you feel that this change is inappropriate, and that the current behavior should be left as-is, then I'd like to alternatively propose that the documentation be updated (here, in wallpaper-cli, and in the Node wallpaper module) to make this behavior clear.
Thanks!
The text was updated successfully, but these errors were encountered:
I would have expected the same behavior as you too. Not sure either what to do about it though, or how it works on other platforms.
Cool module btw.
sindresorhus
changed the title
invoking multiply with the same path/different file, produces no change
Invoking multiply with the same path/different file, produces no change
Aug 3, 2017
I've written (well, ported) a program that procedurally generates tiled wallpapers (not yet in npm), using the
wallpaper
module to optionally set it as the desktop background. A straightforward method of use would seem to be to keep invoking it to generate a new background at the same location, and then reset the wallpaper. However, the Mac OSwallpaper
CLI tool doesn't allow for this mode of use, as after the first invocation, further invocations after image regenerations have no effect on the desktop background.To be clear, this is the sort of thing I'm talking about:
Obviously, this is an artifact of the way that
setDesktopImageUrl
works, and not anythingmacos-wallpaper
is doing per se... but of course users shouldn't have to be bothered with how the underlying mechanisms of the tool (or module) work - it should "just work" according to the most straightforward user expectations.Not sure the best way to go about this. I assume there's some way to send a message to Dock to reload the wallpaper, but judging from discussion on #13 the right way to do this isn't currently known. Perhaps just flushing the setting to, I dunno,
/dev/null
, and then to the user-supplied argument? This probably produces an annoying sort of "flash", but it could be mitigated by only doing this if the new argument matches the pre-existing value in the db.Obviously, my app, and other consumers of the
wallpaper
npm module, could just do this ourselves, instead of askingmacos-wallpaper
to fix it; but fixing it in one place instead of working around it in many others seems the more ideal solution.Another point to consider is consistency across platforms - what do the Windows or Linux implementations of the
wallpaper
module do when they receive the same path twice (but with different actual image files)? If they behave differently than the Mac OS version, then unification would seem a good idea.However, if you feel that this change is inappropriate, and that the current behavior should be left as-is, then I'd like to alternatively propose that the documentation be updated (here, in
wallpaper-cli
, and in the Nodewallpaper
module) to make this behavior clear.Thanks!
The text was updated successfully, but these errors were encountered: