diff options
Diffstat (limited to 'pkg/background/set_darwin.go')
-rw-r--r-- | pkg/background/set_darwin.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pkg/background/set_darwin.go b/pkg/background/set_darwin.go new file mode 100644 index 0000000..2ead214 --- /dev/null +++ b/pkg/background/set_darwin.go @@ -0,0 +1,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 +} |