menubar-native

command
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 9 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.

README

Native menu bar window

Run from the repository root:

go run ./examples/menubar-native

Click the note icon in the menu bar (macOS) or notification area (Windows) to open Quick Notes, a frameless window drawn by package ui. Click the icon again, click outside the window, press Escape, or use Hide to dismiss it. The panel opens beside the icon and stays within its display's work area. There is no Dock icon on macOS or taskbar button on Windows.

Type a note and use Copy note to put it on the clipboard. Hiding and reopening the window preserves its text, selection, and undo history; notes stay in memory until you quit. Quit is available in the window and in the icon's right-click menu, which opens below the menu bar on macOS with AppKit's status-item placement and highlighting. Cmd+W/Ctrl+W hides the panel, and Cmd+Q/Ctrl+Q quits while it has focus.

Linux uses AppIndicator, which supports menus but no click events or icon bounds. Choose Open Quick Notes from the tray menu to open the same native window, centered on screen. Install libayatana-appindicator3 if NewTray reports it missing. Wayland compositors choose window positions.

The example needs Go alone, with no frontend build or webview. To develop with live reload or package it:

go run ./cmd/golet dev examples/menubar-native
go run ./cmd/golet build examples/menubar-native

The macOS bundle declares LSUIElement so it starts as a menu bar app; ActivationPolicyAccessory also handles running it with go run.

Documentation

Overview

Menubar-native is a menu bar app whose icon opens a window of native UI. It needs Go alone: no web page, JavaScript, or webview.

go run ./examples/menubar-native

Jump to

Keyboard shortcuts

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