refactoring: move logic in different files
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/test Pipeline is pending approval

This commit is contained in:
Simon Vieille 2024-07-31 12:38:34 +02:00
commit 098b04f5a5
Signed by: deblan
GPG key ID: 579388D585F70417
5 changed files with 108 additions and 49 deletions

19
feh.go Normal file
View file

@ -0,0 +1,19 @@
package main
import (
"os"
"os/exec"
)
func FehUpdateWallpapers(files []string) (*exec.Cmd, error) {
args := []string{}
for _, file := range files {
args = append(args, "--bg-fill", file)
}
cmd := exec.Command("feh", args...)
cmd.Env = os.Environ()
return cmd, cmd.Run()
}