summary refs log blame commit diff stats
path: root/pkg/background/set_darwin.go
blob: 2ead214e4ecaec585a00f6c9698d3434ec20ff4d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                                                                                                     
// +build darwin

package background

import (
	"os/exec"
	"strconv"
)

// Set calls feh to set the background
func Set(path string) error {
	err := exec.Command("osascript", "-e", `tell application "System Events" to tell every desktop to set picture to `+strconv.Quote(path)).Run()
	return err
}