frostui is a Go module that gives desktop apps on MyGo a command-center window and the pieces to fill it, for frostyard's apps: ChairLift, Frostmail, Frostnotes, the Firn GUI installer and the Pocket client.
Status: pre-release. Until v1, a minor version may change the API, and each change is listed in the design doc.
Documentation: pkg.go.dev/github.com/frostyard/frostui
| Package | What it gives you |
|---|---|
frostui |
The shell (top bar with a command palette, rail, console and status bar), a frame without the rail for apps made of panes, a serial job queue, a command table behind keys, menus and the palette, a source list, a settings layout, an allow-listed opener, a tray icon with a close-to-tray check, dialogs, cards, rows, charts, a native unified diff viewer, the desktop's icons (with an embedded set), and frostyard's look: the Frostyard and Frostyard light themes, set in Inter. |
frostuitest |
A stand-in for the UI thread, so tests run what workers post without a window. |
The repository also holds workspaceui, a
module of its own (github.com/frostyard/frostui/workspaceui) for apps on
NSGo: the Frostyard themes as an NSGo
theme set in Inter, a shell with a navigation sidebar and side panels, a
file explorer, a conversation view and a notice. It shares no code with
frostui and does not require MyGo.
Info dialogs, including About and
keyboard shortcuts, stack their body content vertically. The body takes
its natural height when it fits and scrolls when it overflows. Close stays
fixed above the body, and a long wrapped title can scroll separately so it
doesn't crowd out the body in a short window.
IconButton, QuietIconButton and PrimaryIconButton all require a
nonempty action label for the accessible name and tooltip. The kit passes
an empty label through unchanged, without validation or a fallback. See the
icon-only label contract.
QuietIconButton(c, icon, label) is an icon-only action with no resting fill
or border, and visible hover, press and keyboard-focus treatments. Chain
dimensions, Disabled, Clicked or OnClick as on IconButton, which keeps
its ghost hairline.
PrimaryIconButton(c, icon, label) is an icon-only primary action on
PrimaryButton's gradient and foreground. Dimensions, activation, focus and
Disabled chain as on MyGo's button.
Use Icon(c, "cpu") for a processor glyph. The embedded icon set
provides cpu and cpu-symbolic when neither the app nor the desktop theme does.
It builds without CGO for Linux, Windows and macOS on amd64 and arm64, and for js/wasm. The freedesktop parts (app ID, icon theme, launching desktop apps, whether a panel hosts the tray icon) work on Linux and fall back elsewhere.
- Go 1.27.
- At run time, what MyGo needs: GTK 3, libepoxy and Pango on Linux, and
libayatana-appindicator3for a tray icon. - For the tests: Pango and cairo, and no display.
go get github.com/frostyard/frostuiimport (
"log"
"github.com/egoist/mygo"
"github.com/egoist/mygo/ui"
"github.com/frostyard/frostui"
)
func main() {
shell := &frostui.Shell{Brand: frostui.Brand{Name: "Notes"}, Selected: "all"}
nav := []frostui.NavSection{{Title: "Notebooks", Items: []frostui.NavItem{
{ID: "all", Title: "All notes", Icon: "folder"},
}}}
mygo.App.WhenReady(func() {
mygo.NewWindow(mygo.WindowOptions{
Title: "Notes", Width: 1100, Height: 720, TitleBarStyle: mygo.TitleBarHidden,
Content: ui.View(func(c *ui.Context) {
shell.View(c, frostui.Frame{
Nav: nav,
Content: func() { frostui.PageHeader(c, "All notes", "3 notes", nil) },
})
}),
})
})
if err := mygo.App.Run(); err != nil {
log.Fatal(err)
}
}examples/commandcenter adds the palette, the console, the job queue and the status bar: go run ./examples/commandcenter. examples/threepane is a window of panes with no rail: go run ./examples/threepane. examples/sourcelist shows a source list, a command table, a lazy palette source and a settings dialog: go run ./examples/sourcelist.
The source-list example also has Open Example Link in its main menu
and command palette, with no new key binding. Its
command and helper call
Opener.OpenURL for https://example.org
on a worker. The UI thread shows pending status and disables duplicate
opens until it applies the worker's posted result. The result stays
visible, with the URL and any launch error; no status appears before
invocation.
See the source-list design and test coverage
for the rendering and headless checks.
mise install # Go from go.mod, plus pinned golangci-lint and Node
make ci # what CI runsDesign and invariants: docs/design/frostui.md.
- AGENTS.md: the rules for agents and contributors.
- docs/README.md: the decisions, designs, specs and plans.
- SECURITY.md: report a vulnerability privately.
- LICENSE: MIT. The embedded icons are Lucide's, under the ISC license: NOTICE, icons/LICENSE.
