fix #1: add cache of latest command to not run wallpaper update when it's already up to date
This commit is contained in:
parent
f8b846018b
commit
3e3f4445a4
4 changed files with 20 additions and 9 deletions
4
feh.go
4
feh.go
|
|
@ -5,7 +5,7 @@ import (
|
|||
"os/exec"
|
||||
)
|
||||
|
||||
func FehUpdateWallpapers(files []string) (*exec.Cmd, error) {
|
||||
func FehUpdateWallpapers(files []string) *exec.Cmd {
|
||||
args := []string{}
|
||||
|
||||
for _, file := range files {
|
||||
|
|
@ -15,5 +15,5 @@ func FehUpdateWallpapers(files []string) (*exec.Cmd, error) {
|
|||
cmd := exec.Command("feh", args...)
|
||||
cmd.Env = os.Environ()
|
||||
|
||||
return cmd, cmd.Run()
|
||||
return cmd
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue