Documentation
¶
Overview ¶
Package popups renders the notification popup window: a stack of cards on one output, following the notification service's feed, auto-dismissing after the configured duration, hidden while DND.
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.
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 stack remaps on the configured monitor (the primary fallback) at once.
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.