summary refs log tree commit diff stats
path: root/pkg/background/set.go
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-03-24 11:49:57 +0530
committerAndinus <andinus@nand.sh>2020-03-24 11:49:57 +0530
commit522c16f46419ddc19cb07808c53862292b8fd3ba (patch)
tree86c80b37c26f29f4cda058e242f7b96e3f525ddb /pkg/background/set.go
parent7bf70520a744d5b6b60a805990a82aaa180fb64b (diff)
downloadcetus-522c16f46419ddc19cb07808c53862292b8fd3ba.tar.gz
Add darwin support
Diffstat (limited to 'pkg/background/set.go')
-rw-r--r--pkg/background/set.go28
1 files changed, 0 insertions, 28 deletions
diff --git a/pkg/background/set.go b/pkg/background/set.go
deleted file mode 100644
index 0f7333d..0000000
--- a/pkg/background/set.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package background
-
-import (
-	"fmt"
-	"os"
-	"os/exec"
-)
-
-// Set calls feh to set the background
-func Set(path string) error {
-	var err error
-	switch os.Getenv("XDG_CURRENT_DESKTOP") {
-	case "GNOME", "Unity", "Pantheon":
-		path = fmt.Sprintf("%s%s", "file://", path)
-		err = exec.Command("gsettings", "set org.gnome.desktop.background picture-uri", path).Run()
-		return err
-	case "LXDE":
-		err = exec.Command("pcmanfm", "-w", path).Run()
-		return err
-	default:
-		feh, err := exec.LookPath("feh")
-		if err != nil {
-			return err
-		}
-		err = exec.Command(feh, "--bg-fill", path).Run()
-		return err
-	}
-}