appwindow

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package appwindow opens the user interface in its own window.

A Chromium-based browser in "app mode" gives a chromeless window with no tabs, address bar or bookmarks, which reads as a native application window while keeping the whole program a single dependency-free binary. If no such browser is available the page is opened in the default browser instead.

Index

Constants

View Source
const BrowserEnv = "FLOCKDECK_BROWSER"

BrowserEnv names a specific browser binary to use, overriding the search.

Variables

View Source
var ErrNoBrowser = errors.New("no browser found to display the interface")

ErrNoBrowser is returned when nothing could be found to display the UI.

Functions

This section is empty.

Types

type Window

type Window struct {

	// AppMode reports whether the window is a dedicated app window rather than
	// a tab in the user's ordinary browser.
	AppMode bool
	// Program is the browser that was launched, for diagnostics.
	Program string
	// contains filtered or unexported fields
}

Window is a running UI window.

func Open

func Open(url, profileDir string) (*Window, error)

Open displays url in a window. profileDir holds the browser profile used for app mode, keeping it separate from the user's own browsing profile so the window opens clean and does not disturb their session.

func (*Window) Close

func (w *Window) Close()

Close terminates an app-mode window.

func (*Window) Wait

func (w *Window) Wait() error

Wait blocks until an app-mode window is closed. It returns immediately for a tab opened in the default browser, whose lifetime cannot be observed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL