From 58122b41d2fc536e5f2ad30da70e33e59a18dc90 Mon Sep 17 00:00:00 2001 From: Andinus Date: Thu, 19 Mar 2020 13:22:57 +0530 Subject: Add download function --- pkg/background/set.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pkg/background/set.go (limited to 'pkg/background/set.go') diff --git a/pkg/background/set.go b/pkg/background/set.go new file mode 100644 index 0000000..fa95f6f --- /dev/null +++ b/pkg/background/set.go @@ -0,0 +1,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 +} -- cgit 1.4.1-2-gfad0