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

Mac OS - Second Screen #21

Closed
paurosello opened this issue Oct 23, 2018 · 7 comments
Closed

Mac OS - Second Screen #21

paurosello opened this issue Oct 23, 2018 · 7 comments

Comments

@paurosello
Copy link
Contributor

Only changes background on main screen

@angelbarrera92
Copy link
Owner

I dont know if this applies in this repository. We are using a third party golang library: https://github.com/reujab/wallpaper
So, we have to investigate if we can use this library with some options to solve this issue, or open a new issue to @reujab: https://github.com/reujab/wallpaper

@reujab
Copy link

reujab commented Oct 24, 2018

@paurosello The library uses AppleScript to set the wallpaper, but I don't have instant access to a Mac, so can you run the following command in a terminal and tell me if it sets the background of every desktop?

osascript -e 'tell application "System Events" to tell every desktop to set picture to POSIX file "/Library/Desktop Pictures/Desert.jpg"

@paurosello
Copy link
Contributor Author

It works after accepting the following popup in Mojave :)

image

@reujab
Copy link

reujab commented Nov 2, 2018

If you replace System Events with Finder, does it display the same popup?

@paurosello
Copy link
Contributor Author

paurosello commented Nov 3, 2018

Tried this and other solution like:

tell application "Finder"
	set theDesktops to a reference to every desktop
	set picture of desktop of the theDesktops to POSIX file "/Library/Desktop Pictures/Desert 3.jpg"
end tell

with no luck, cannot seem to do it with finder for both screens, only with Sytem Events

@reujab
Copy link

reujab commented Nov 6, 2018

The popup is undesirable, so I will not make System Events the default behavior of my library.

@angelbarrera92 What behavior do you want? Do you want your application to always display this popup, regardless of whether the user has multiple desktops?

EDIT: pinged wrong person

@angelbarrera92
Copy link
Owner

I did not see this message before, sorry.

We can assume click on a modal button if we can put hoff in all MacOS screens.

Thanks @reujab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants