summary refs log tree commit diff stats
path: root/pkg/background/set.go
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-03-19 13:22:57 +0530
committerAndinus <andinus@nand.sh>2020-03-19 13:22:57 +0530
commit58122b41d2fc536e5f2ad30da70e33e59a18dc90 (patch)
tree81fd113d40b670c97b5ae85e5f52a91ad7d8a004 /pkg/background/set.go
parent5e6090c35f3d6105b20e529cc23c76a339ba944f (diff)
downloadcetus-58122b41d2fc536e5f2ad30da70e33e59a18dc90.tar.gz
Add download function
Diffstat (limited to 'pkg/background/set.go')
-rw-r--r--pkg/background/set.go13
1 files changed, 13 insertions, 0 deletions
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
+}