v0.1.0 47aaa0f

README.md RawHistoryFolder

NeferGUI

A native Go GUI library for Linux: Wayland windows, Vulkan rendering, and CSS styling. Build your view from the current model; controls return events during that call. No cgo required.

[!WARNING] Early development. No release yet. Expect bugs and breaking changes. Platform accessibility is not connected.

A small example

package main

import (
	"context"
	"fmt"
	"log"

	"github.com/bnema/nefergui"
)

func main() {
	count := 0
	view := func(f *nefergui.Frame, count *int) {
		root := f.Root().Column()
		root.Text("Hello, Wayland!")
		if root.Button("Count", nefergui.Key("count")).Activated() {
			*count++
		}
		root.Text(fmt.Sprintf("Clicked %d times", *count))
	}
	if err := nefergui.Run(context.Background(), &count, view,
		nefergui.Title("Hello"), nefergui.Size(320, 200)); err != nil {
		log.Fatal(err)
	}
}

Default styles work without a stylesheet; nefergui.Styles("app.css") loads your own CSS.

Try it

Requires Go 1.27, libvulkan.so.1, libxkbcommon.so.0, usable fonts, and a Wayland compositor supporting linux-dmabuf and linux-drm-syncobj. Fractional scaling also requires viewporter. No X11 or software-rendering fallback.

go get github.com/bnema/nefergui

From a checkout, run the demo:

CGO_ENABLED=0 go run ./examples/demo

Documentation

License

GNU GPL v3. Third-party code and test fonts retain their own licenses and attribution.

source
1# NeferGUI
2
3A native Go GUI library for Linux: Wayland windows, Vulkan rendering, and CSS styling. Build your view from the current model; controls return events during that call. No cgo required.
4
5> [!WARNING]
6> **Early development.** No release yet. Expect bugs and breaking changes. Platform accessibility is not connected.
7
8## A small example
9
10```go
11package main
12
13import (
14	"context"
15	"fmt"
16	"log"
17
18	"github.com/bnema/nefergui"
19)
20
21func main() {
22	count := 0
23	view := func(f *nefergui.Frame, count *int) {
24		root := f.Root().Column()
25		root.Text("Hello, Wayland!")
26		if root.Button("Count", nefergui.Key("count")).Activated() {
27			*count++
28		}
29		root.Text(fmt.Sprintf("Clicked %d times", *count))
30	}
31	if err := nefergui.Run(context.Background(), &count, view,
32		nefergui.Title("Hello"), nefergui.Size(320, 200)); err != nil {
33		log.Fatal(err)
34	}
35}
36```
37
38Default styles work without a stylesheet; `nefergui.Styles("app.css")` loads your own CSS.
39
40## Try it
41
42Requires Go 1.27, `libvulkan.so.1`, `libxkbcommon.so.0`, usable fonts, and a Wayland compositor supporting linux-dmabuf and linux-drm-syncobj. Fractional scaling also requires viewporter. No X11 or software-rendering fallback.
43
44```sh
45go get github.com/bnema/nefergui
46```
47
48From a checkout, run the [demo](examples/demo):
49
50```sh
51CGO_ENABLED=0 go run ./examples/demo
52```
53
54## Documentation
55
56- [Controls](docs/controls.md) and [layout](docs/layout.md)
57- [CSS properties and limitations](docs/css.md)
58- [Runtime requirements and behavior](docs/runtime.md) and [troubleshooting](docs/troubleshooting.md)
59- [Visual test harness](docs/harness.md) and [performance](docs/performance.md)
60- [Architecture decisions](docs/adr)
61
62## License
63
64[GNU GPL v3](LICENSE). Third-party code and test fonts retain their own licenses and attribution.

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 12

↑↓ moveenter openesc close