Yesterday, I successfully ran sway out of the box within X11, fired a terminal, and ran a couple of gio examples in Wayland. Ctrl+D allows you to run any program via dmenu, so that let me start my terminal emulator.
It's a bit clunky, because the parent window manager takes precedence with keyboard shortcuts, but it mostly works.
Having said this, I agree X11 support would be good. We all have plans to move to Wayland eventually, but I think X11 support would be key to Gio's success in the short term.
~eliasnaur could you write a short doc with the steps one would have to follow to implement X11 support? Perhaps then someone with enough interest could step in and start contributing patches.
I don't feel strongly about this. The point of this issue was bringing to your attention that 'go run' has some disadvantages of its own, so it's a tradeoff.
In case you didn't know, Paul wrote https://github.com/myitcv/gobin, which among other things, caches binaries.
Thanks, that's useful.
I guess one follow-up question would then be - is there a recommended way to do anything more than simple 2D graphics with gio?
I think 'go' was a bit different, because it was a bit of a power play. I'm not sure if you can pull off the same, when glib2 is in the way :)
Are there any alternative or related names you can think of?
Another option would be for 'gio' to be the recommended name/alias, and distros/systems could package it as 'gioui' by default only.
gio is taken by glib2 on Arch Linux, for example. So it's extremely unlikely that it could ever be packaged on that distro, or probably any other major Linux distros.
I understand that it's mainly a development tool, so it's fine if Go developers simply 'go get' it. However, in the long term I assume we want the tool to become more mainstream. Imagine if desktop apps are packaged in Linux distros, and then gio itself needs to be packaged.
I got the idea from https://github.com/golang/go/issues/33468, which says:
Avoids binary name clashes. It just so happens that gio already exists on my system (I believe it is a Gnome tool).
Sorry, I forgot to link https://github.com/golang/go/issues/25416. I think 'go run' is only meant for sporadic use, not for continuous use.
I think any of these for users other than 'go get' is better than a 404:
- redirecting to godoc.org/
- redirecting to the source location
- redirecting to a generated page linking to all of the above
The README mentions gioui.org/apps/gophers, but I can't easily find a list of all such examples/demos. gioui.org/apps is a 404 too.
If there are no more examples - perhaps more could be added.