Documentation
¶
Overview ¶
Package niriworkspaces renders the niri workspaces that live on one output as clickable cells. niri workspaces are dynamic (they come and go, are numbered per-output, and may be named), so unlike River's fixed tag mask this module draws exactly the workspaces niri reports — no empty placeholder cells.
Styling mirrors the rivertags module and reuses the same [tags] config so a niri user gets the same numbered-cell or dot look with no extra knobs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Style ¶
type Style struct {
Foreground color.RGBA
FocusedBG color.RGBA
FocusedFG color.RGBA
OccupiedBG color.RGBA
OccupiedFG color.RGBA
UrgentBG color.RGBA
UrgentFG color.RGBA
EmptyFG color.RGBA
CellPaddingPx int32
// Dots renders each workspace as a filled circle coloured by occupancy
// instead of a labelled cell.
Dots bool
DotEmpty color.RGBA
DotOccupied color.RGBA
DotUrgent color.RGBA
}
Style holds the per-state colours, matching rivertags.Style.
type Workspaces ¶
type Workspaces struct {
// contains filtered or unexported fields
}
Workspaces subscribes to niri state and renders the workspaces on one output.
func New ¶
func New(output string, style Style) *Workspaces
New builds a Workspaces module pinned to the given output connector (e.g. "DP-2"), as reported by wl_output.name.
func (*Workspaces) Name ¶
func (w *Workspaces) Name() string
func (*Workspaces) OnClick ¶
func (w *Workspaces) OnClick(clickID string, button uint32)
OnClick focuses the clicked workspace on left-button release. niri has no per-workspace toggle semantics like River's tags, so other buttons are ignored.
func (*Workspaces) Render ¶
func (w *Workspaces) Render() []module.Segment
func (*Workspaces) Start ¶
func (w *Workspaces) Start(ctx context.Context) <-chan struct{}