add callback option
This commit is contained in:
parent
70fe7c72ce
commit
d11d8c7f87
5 changed files with 52 additions and 6 deletions
19
callback.go
Normal file
19
callback.go
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
func CallbackUpdateWallpapers(callback string, files, screens []string) (*exec.Cmd, error) {
|
||||
args := []string{}
|
||||
|
||||
for key, file := range files {
|
||||
args = append(args, screens[key], file)
|
||||
}
|
||||
|
||||
cmd := exec.Command(callback, args...)
|
||||
cmd.Env = os.Environ()
|
||||
|
||||
return cmd, cmd.Run()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue