Need recommendations on GUI frameworks

So, I’ve built this CLI app which uses rofi as a dmenu to display minimal prompts like the one shown below:

Since I’m thinking of making my software cross-platform, I’m planning to get rid of the rofi dependency, and instead display the prompt using Go itself.
I’ve found two possible frameworks for achieving this:

Here is what I’d like the prompt to be able to do:

  • display a list
  • take input as text
  • assign some hotkeys which the prompt should detect
  • should be “always on top” of other windows, and must not have any title bar etc.

Since this is my first time developing GUI using Go, I’d like some help and recommendations to get started.
Thanks in advance.
- Utkarsh

Of these two, fyne looks quite stable while ui calls itself “mid-alpha software”.

Because of this I’d start with fyne which seems to have some decent documentation.

3 Likes

Thanks. I’ll start with Fyne.

Also note that in addition to ui described as mid-alpha level, it has no activity with the last updates 2 years ago. It will likely remain mid-alpha.

1 Like

I am not sure about what exactly you are building here, but isn’t GTK an option here? GTK is supported on Linux, Windows and MacOS.

1 Like

You can try https://gioui.org/

  • Cross platform win/mac/linux/android/ios
  • Pure go (no CGO deps)

I’ve mucked about with it a bit and it works quite well.

I used Fyne to do something with a GUI

It’s pretty good but still getting better with each release.

Some people may recommend GIO… I do not like that library because it’s confusing, hard to work with, and the documentation isn’t great. Also there are very few examples out there using it. So I would recommend Fyne.

I did a little work with gotk3 and of the GoLang GUI options it’s definitely not bad, though channels don’t work the way you expect when you start interacting with GUI code…

I’m actually planning to use https://github.com/ultralight-ux/ and just implement the basics to open the Ultralight window, systray icon and right click menu in C, and then use Go to power a typical web front end on the desktop…

My initial thought was to implement it all in gotk3, but you do sacrifice some of the typical benefits of Go when you’re interacting with the C libraries.

So I’ve tried the above mentioned frameworks… all of them.

And to be honest… the best one that I have used isn’t mentioned.

I like QT bindings the best. There’s a ton of widgets and while there isn’t much documentation, the examples are very similar to examples found in every other language (ie: C++ python etc.). Actually I was stuck on a file dialog issue last night and just googled the C++ example to solve my issue.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.