refactoring: move logic in different files
This commit is contained in:
parent
8e5d3c7907
commit
098b04f5a5
5 changed files with 108 additions and 49 deletions
19
feh.go
Normal file
19
feh.go
Normal 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()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue