Skip to content

Commit

Permalink
support darwin multi screen, close reujab#4
Browse files Browse the repository at this point in the history
  • Loading branch information
Mindy Cong committed Mar 19, 2019
1 parent 0bbdacc commit 36e78b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func Get() (string, error) {

// SetFromFile uses AppleScript to tell Finder to set the desktop wallpaper to specified file.
func SetFromFile(file string) error {
return exec.Command("osascript", "-e", `tell application "Finder" to set desktop picture to POSIX file `+strconv.Quote(file)).Run()
return exec.Command("osascript", "-e", `tell application "System Events" to tell every desktop to set picture to `+strconv.Quote(file)).Run()
}

// SetFromURL downloads `url` and calls SetFromFile.
Expand Down

0 comments on commit 36e78b5

Please sign in to comment.