Skip to content

Add madmedicnl/niri-workspaces (1.0.0) - #1412

Open
madmedicnl wants to merge 1 commit into
noctalia-dev:mainfrom
madmedicnl:add-niri-workspaces
Open

madmedicnl wants to merge 1 commit into
noctalia-dev:mainfrom
madmedicnl:add-niri-workspaces

Conversation

@madmedicnl

@madmedicnl madmedicnl commented Nov 12, 2026 •

Copy link
Copy Markdown

Plugin

  • Id: madmedicnl/niri-workspaces
  • New plugin
  • Update to an existing plugin (version bumped in plugin.toml)

What it does

A bar widget for niri that draws the workspaces the way the built-in Focus Hint
style does — a dot for every workspace you are not on, an expanded pill with its
name for the one you are — plus one thing widget.workspaces cannot do: a
comma-separated list of workspace names that are not drawn at all
.

That is for a shelf rather than a desk. A scratchpad (nscratch and similar)
parks windows on a workspace nobody switches to, and widget.workspaces has no
hidden_workspaces setting (noctalia msg config-set widget.workspaces.hidden_workspaces … is refused as an unknown setting), so
that shelf costs a pill, or a dot, that means nothing to the operator.

The workspace you are on is always drawn, even when it is on the list: an
operator on an invisible workspace with no way back is worse than a dot.

Left click a dot or the pill focuses that workspace, scrolling goes to the next
or previous one, hovering a dot shows its name. Colours are palette roles
(tertiary for dots, primary for the pill), so they follow the theme.

The widget in a bar

External dependencies

niri, used three ways and nothing else: niri msg --json workspaces (loaded
once and re-read every 60 s as a self-heal), niri msg --json event-stream (read
continuously for WorkspacesChanged and WorkspaceActivated), and niri msg action focus-workspace / focus-workspace-up / -down from clicks and scrolls.

No network calls, no files written, nothing persisted — workspace state lives in
memory. No environment is read beyond PATH.

Testing

Live in a niri 25.x session (single output):

  • The scratch workspace stays out of the bar while a file manager and a control
    panel are parked on it, and appears as the pill the moment it is focused —
    then goes again.

  • The pill follows workspace changes without a reload (event stream), and a
    restart of the shell repopulates from the snapshot.

  • Settings toggled through Settings → Plugins (gear beside the plugin):
    hidden list edited, dot_size, dot_color and gap changed live.

  • Clicking a dot focuses that workspace; scrolling over the widget steps
    through them.

  • Tested on Niri

  • Tested on Hyprland

  • Tested on Sway

  • Tested on another compositor:

  • Noctalia version tested against: 5.4.1

  • Plugin API level: 32

Screenshots / Videos

Bar with the widget

The card thumbnail.webp is composed by hand at 960×540 from the same bar
screenshot, because the thumbnail generator needs a browser I did not have in
this session — happy to regenerate it with the generator if you would rather
have its house style.

Checklist

  • The directory name matches the part of id after the / in plugin.toml exactly.
  • It ships plugin.toml, README.md, thumbnail.webp, and translations/en.json.
  • README.md follows the README template, documents every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.
  • thumbnail.webp is present and relevant; for a new plugin I created it with the thumbnail generator, and for an update I regenerated it with the generator if the visual identity or user-facing appearance changed.
  • version follows semver and is bumped in this PR; plugin_api is the oldest API level this plugin requires.
  • Every non-English translation in this PR uses a locale supported by Noctalia core, and I can read, write, and understand that language well enough to review and maintain it (no unreviewed machine/LLM translations).
  • I did not edit catalog.toml; CI generates it.
  • This PR touches exactly one plugin directory.

Code review attestation

  • The code is readable and not obfuscated, minified, or generated.
  • Code identifiers and code comments are in English.
  • It does not download and execute remote code.
  • Every network call, filesystem write, and spawned process is something the description above accounts for.
  • I have the right to publish this code under the license declared in plugin.toml.

A niri workspace switcher that draws the Focus Hint look — a dot for every
workspace you are not on, an expanded pill with its name for the one you are —
and leaves named workspaces out of the bar. A scratchpad parks windows on a
workspace nobody switches to; the built-in workspaces widget has no way to drop
one, so the shelf costs a pill that means nothing.
@github-actions
github-actions Bot marked this pull request as draft November 12, 2026 11:07
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

The description now contains the required template structure.

@madmedicnl
madmedicnl marked this pull request as ready for review November 12, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant