macos-wallpaper
macos-wallpaper copied to clipboard
Support `tile` mode
This is a nice little utility. However, I can't fully use it because I like to use tiled graphics for my desktop picture. (Or whatever the correct name for it is---it's what System Preferences.app presents as "Tile").
Is there a way to add tile
to the list of [scale]
choices?
Unfortunately, there doesn’t seem to be a way to set the “Tile” option using setDesktopImageURL
. I’ll take a look at modifying desktoppicture.db
directly, however, this would arguably be a hacky solution.
OK, I see then. Never mind.
I took a look at how macOS modifies desktoppicture.db
when setting the “Tile” option and found that it adds a new row to the data
table containing just the number 2
and adds multiple rows to preferences
with a key
of 2
and a data_id
of the newly created data
row.
Based on this, I was able to set the “Tile” option using:
sqlite3 ~/Library/Application\ Support/Dock/desktoppicture.db "INSERT INTO data (value) VALUES (2); INSERT INTO preferences (key, data_id, picture_id) SELECT DISTINCT 2, last_insert_rowid(), picture_id FROM preferences;" && killall Dock
I haven’t tested this thoroughly (e.g. with multiple Spaces or displays) and it requires you to kill the Dock but perhaps it is helpful to someone.
Would it be possible to reopen this, for tracking? Perhaps with a tag marking it as low priority... it's not actually fixed, and if you consider it "wontfix", I assume it's only because an appropriate way to go about it has yet to be found, and not because you have no interest in implementing it.
I recognize that there are currently issues with figuring out how to do this, but of course it must actually be possible if "Settings" does it (and without killing Dock - though perhaps one could specify a non-death signal that will get it to reevaluate the db?)
I'm not sure when I'd get around to it, but even reverse-engineering Settings to find the right way to do this (without killing dock, or ideally directly manipulating the sqlite3 db if that can be avoided) seems potentially valuable.
I have opened a Radar about this, but I doubt Apple will ever fix it.
There's some more reverse engineering here.
https://stackoverflow.com/questions/33533304/change-scaling-for-all-desktop-backgrounds-on-mac-via-a-script