refactor
This commit is contained in:
23
pkg/mesh/test_cmd.go
Normal file
23
pkg/mesh/test_cmd.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
func main() {
|
||||
f, err := os.Open("/home/potassium/documents/wallpaper/8.png")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
cmd := exec.Command(
|
||||
"swaybg",
|
||||
"--image", "/dev/stdin",
|
||||
)
|
||||
cmd.Stderr = os.Stderr
|
||||
cmd.Stdin = f
|
||||
err = cmd.Run()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user