~kennylevinsen/wlhax

2068f459624ea304ac729284cd1bc6b12f84a963 — Kenny Levinsen 11 months ago a8e83a4
Change arg to be command to run
1 files changed, 8 insertions(+), 6 deletions(-)

M main.go
M main.go => main.go +8 -6
@@ 3,17 3,14 @@ package main
import (
	"os"
	"time"
	"os/exec"

	libui "git.sr.ht/~sircmpwn/aerc/lib/ui"
)

const proxyDisplay = "wlhax-0"

func main() {
	var proxyDisplay string
	if len(os.Args) > 1 {
		proxyDisplay = os.Args[1]
	} else {
		proxyDisplay = "wlhax-0"
	}
	remoteDisplay, ok := os.LookupEnv("WAYLAND_DISPLAY")
	if !ok {
		panic("No WAYLAND_DISPLAY set")


@@ 28,6 25,11 @@ func main() {

	dash := NewDashboard(proxy)

	if len(os.Args) > 1 {
		cmd := exec.Command(os.Args[1], os.Args[2:]...)
		cmd.Start()
	}

	ui, err := libui.Initialize(dash)
	if err != nil {
		panic(err)