l4l / yofi

yofi is a minimalistic menu for wayland
https://crates.io/crates/yofi
MIT License
361 stars 21 forks source link

yofi is blank and unresponsive #92

Closed mangoducksparkles closed 2 years ago

mangoducksparkles commented 2 years ago

I just installed yofi, and can launch it from either shell or sway hotkey. However, it is blank and unresponsive. No text appears in the box, and it seems to respond only to escape, which closes it.

I am using sway version 1.7 on Arch LInux 5.16.18-hardened, and yofi is version 0.1.5.

l4l commented 2 years ago

Do you use pre-built version or you build it manually? In the last case make sure it is build in release mode, its launch latency is indeed huge for debug builds.

If that's a pre-built binary then I need more info, something like running cargo-flamegraph for a few seconds should be sufficient.

l4l commented 2 years ago

I might guess font database loading might be an issue so using an absolute font path in config should help, e.g:

font = "/usr/share/fonts/noto/NotoSansMono-Light.ttf"

Also I added few optimizations (#93) but that probably won't be noticeable.

mangoducksparkles commented 2 years ago

So, it was a font issue. I just had to give it the name of a font I knew I had installed (LIberation Mono), and it worked fine. It didn't even need an absolute path. I had assumed it would detect a default font or something.

Also, it seems to have trouble finding the Iosevka font. For some reason, it would only recognize "Iosevka Thin", and not any of the other versions I have installed (like Iosevka or Iosevka Fixed).

Regardless, it's working now. Thanks :)

l4l commented 2 years ago

You may use fc-list for searching font path. Also there's a fontkit backend, that has a better loading time but less number of supported fonts and some other problems afair (there's no pre-built binaries, but you may use cargo b --release --no-default-features --features font-fontkit).

Anyway, for now it's quite hard to do something with the behavior of current lib so I'm closing the issue.