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 ¶
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 ¶
Run follows the service's feed until life ends; each change reconciles on the loop goroutine, which owns the widget tree, or, headless, on Run's own.