uifocus

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package uifocus is the one-shot handoff from the CLI to a running UI. The CLI writes a hash; the desktop app or a serve tab reads and deletes it. The file lives next to the profile's config — not in SQLite — so a sync cannot wipe a pending focus and a snapshot cannot carry one.

Index

Constants

View Source
const MaxAge = 2 * time.Minute

MaxAge is how long a focus request stays valid. Older files are ignored so a leftover from yesterday cannot yank the list when the app next opens.

Variables

This section is empty.

Functions

func Path

func Path() (string, error)

Path is the focus file for the active profile.

func PathFor

func PathFor(profile string) (string, error)

PathFor is the focus file for a named profile ("" / "default" = root).

func Take

func Take() (hash string, ok bool, err error)

Take returns a still-fresh hash and deletes the file. ok is false when there is nothing to apply (missing, empty, or stale).

func TakeFor

func TakeFor(profile string) (hash string, ok bool, err error)

TakeFor is Take for a named profile. Workspace mounts pass the /w/<name> segment so they do not consume the process-primary file.

func Write

func Write(hash string) error

Write records a view hash (query string, no #/?) for the running UI to apply.

func WriteFor

func WriteFor(profile, hash string) error

WriteFor records a view hash for the named profile's UI.

Types

This section is empty.

Jump to

Keyboard shortcuts

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