Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.
This repository was archived by the owner on Aug 25, 2025. It is now read-only.

Not working on macOS #70

@apeir-n

Description

@apeir-n

Hey, so I'm running macOS 15.5 on an M4 MacBook. I tried the prebuilt arm binaries and building from source. I think it might be because ueberzug-go is trying to query a terminal window running on an X11 server? I'm not sure, I would think that ueberzug-go would be able to tell what display server it's running on, but I don't really know how it works. In any case, I patched the render.go file to skip image rendering entirely because it just wouldn't work with any configuration. I changed this block:

func (r *Renderer) Send(path string, start bool) {
	if start {
		go OpenImage(path, r.c)
	} else {
		r.c <- path
	}
}

to this:

func (r *Renderer) Send(path string, start bool) {
	if runtime.GOOS == "darwin" {
		return // skip entirely
	}
	if start {
		go OpenImage(path, r.c)
	} else {
		r.c <- path
	}
}

and added import "runtime" at the top. This got it working, but of course I'd like to have album art in it. Is this something you could fix, or could you point me towards a path to fixing it? Or could it just be something with my setup somehow?

edit: I forgot to mention, before I patched it and tried to run it, it would initially open and then immediately crash and mess the formatting in my terminal window up. It gave this error when it crashed:

0 33 17 9
         panic: runtime error: index out of range [0] with length 0

                                                                   goroutine 51 [running]:
                                                                                          github.com/BurntSushi/xgb.Get32(...)
                                                                                                                                github.com/BurntSushi/xgb@v0.0.0-20160522181843-27f122750802/help.go:87
                                gitlab.com/diamondburned/ueberzug-go.getActiveWindow(0x13ca000?)
                                                                                                        gitlab.com/diamondburned/ueberzug-go@v0.0.0-20190521043425-7c15a5f63b06/active.go:37 +0x100
                            gitlab.com/diamondburned/ueberzug-go.Initialize()
                                                                                gitlab.com/diamondburned/ueberzug-go@v0.0.0-20190521043425-7c15a5f63b06/init.go:43 +0x134
  gitlab.com/diamondburned/ueberzug-go.GetParentSize()
                                                        gitlab.com/diamondburned/ueberzug-go@v0.0.0-20190521043425-7c15a5f63b06/init.go:82 +0x2c
                                                                                                                                                github.com/aditya-K2/gomp/ui.getFontWidth()
                        github.com/aditya-K2/gomp/ui/render.go:18 +0x1c
                                                                       github.com/aditya-K2/gomp/ui.OpenImage({0x1400010c086, 0x2d}, 0x100014000a99241?)
                                                                                                                                                                github.com/aditya-K2/gomp/ui/render.go:62 +0x2c
                                        created by github.com/aditya-K2/gomp/ui.(*Renderer).Send
                                                                                                        github.com/aditya-K2/gomp/ui/render.go:51 +0x90
                                                                                                                                                       %

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions