1 2 3 4 5 6 7 8 9 10 11 12 13
package background import "os/exec" // Set calls feh to set the background func Set(path string) error { feh, err := exec.LookPath("feh") if err != nil { return err } err = exec.Command(feh, "--bg-fill", path).Run() return err }