summary refs log tree commit diff stats
path: root/pkg/background/set.go
diff options
context:
space:
mode:
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
+}