Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fill-color option #27

Merged
merged 4 commits into from
Apr 21, 2020
Merged

Add fill-color option #27

merged 4 commits into from
Apr 21, 2020

Conversation

medusalix
Copy link
Contributor

@medusalix medusalix commented Jun 1, 2019

I added support for the fillColor property to the API and made it accessible through the CLI-option --fill. Setting the background color without an image URL is not possible, though I looked into the way the system prefpane allows you to choose a custom color. Apparently it stores a transparent picture in the bundles' resources: /System/Library/PreferencePanes/DesktopScreenEffectsPref.prefPane/Contents/Resources/DesktopPictures.prefPane/Contents/Resources/Transparent.tiff. It might be possible to use this image to add the additional functionality of setting a solid color background to the CLI.


IssueHunt Summary

IssueHunt has been backed by the following sponsors. Become a sponsor

@medusalix
Copy link
Contributor Author

@sindresorhus Any thoughts?

readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
@sindresorhus
Copy link
Owner

This looks good for setting a fill color with an image, but there needs to be a way to set just a color too as solid background, per the #19. We can use the transparent image trick.

For the API, it could just be an overload of set:

try Wallpaper.set(
	NSColor.systemRed,
	screen: convertStringToScreen(screen.value)
)

(Without scale and fillColor parameters)

As for the CLI, I'm not sure how to model this. Suggestions welcome.

@sindresorhus
Copy link
Owner

@medusalix Should I close this?

@medusalix
Copy link
Contributor Author

medusalix commented Mar 3, 2020

@sindresorhus I'm still interested in finishing this (as soon as I'm back on my macOS machine).

@medusalix
Copy link
Contributor Author

@sindresorhus I've corrected the usage in the README and renamed the flag to --fill-color. I've started working on the solid color functionality, but this PR needs to be merged first.

@medusalix medusalix changed the title Add fill option Add fill-color option Apr 15, 2020
@sindresorhus sindresorhus merged commit aff2770 into sindresorhus:master Apr 21, 2020
@medusalix medusalix deleted the add-fill-option branch April 30, 2020 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants