popups

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 16 Imported by: 1 module, 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 popups renders the notification popup window: stacks of cards on one output, following the notification service's feed, auto-dismissing after the configured duration, hidden while DND. A stack shows its newest card in front of the older ones and fans out into a list while the pointer is over it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Popups

type Popups struct {
	// contains filtered or unexported fields
}

Popups owns the popup surface for one output. It belongs to the goroutine that owns its widget tree, the application's loop (the one calling it, headless), and every method runs there.

func New

func New(application *app.Application, svc *notifications.Service, cfg *config.Config, font render.Font, sheet *widget.Stylesheet, outputs func() []*app.Output) *Popups

New builds the popup host; it maps on popup-monitor among outputs when the first popup arrives. The service's popup countdowns take the configured popup-duration; sheet is the shell's stylesheet, which styles the cards (nil leaves them unstyled).

func (*Popups) DetachOutput

func (p *Popups) DetachOutput(name string)

DetachOutput closes the surface when its output went away; the stacks remap on the configured monitor (the primary fallback) at once, collapsed, as the pointer left with the surface.

func (*Popups) Run

func (p *Popups) Run()

Run follows the service's feed until the process exits; each change reconciles on the loop goroutine, which owns the widget tree, or, headless, on Run's own.

func (*Popups) SetConfig

func (p *Popups) SetConfig(cfg *config.Config)

SetConfig applies a reloaded config on the loop goroutine: the surface closes and the stacks rebuild at the new position, layer, gap, limits, grouping, and card behavior. The countdowns a hovered stack paused resume, as the pointer leaves with the surface.

func (*Popups) Visible

func (p *Popups) Visible() int

Visible reports the card count (tests).

Jump to

Keyboard shortcuts

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