Skip to content

Add new plugin: Niri Displays - #366

Open
raycursive wants to merge 1 commit into
noctalia-dev:mainfrom
raycursive:niri-displays
Open

Add new plugin: Niri Displays#366
raycursive wants to merge 1 commit into
noctalia-dev:mainfrom
raycursive:niri-displays

Conversation

@raycursive

Copy link
Copy Markdown

Plugin

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

What it does

Niri Displays adds a bar widget, panel, and background service for inspecting connected Niri outputs and applying temporary resolution, refresh-rate, and scale changes. The panel presents resolution and refresh rate together, followed by a scale slider with labeled common scale marks and optional automatic scale presets.

Output changes use Niri's temporary output IPC and intentionally do not rewrite config.kdl.

External dependencies

  • niri must be on PATH, with a running Niri session and NIRI_SOCKET available to Noctalia.
  • Discovery spawns niri msg --json outputs and niri msg --json focused-output.
  • User changes spawn niri msg output <connector> mode ... or niri msg output <connector> scale ....
  • The plugin makes no network requests and writes no files. Snapshots and errors remain in Noctalia's in-memory shared plugin state.

Testing

  • Enabled the plugin from a local path source in a Niri session.

  • Opened the panel from the bar widget and with noctalia msg panel-toggle raycursive/niri-displays:panel.

  • Verified the connected output, connector, focused state, resolution, refresh rate, and scale reported by Niri.

  • Verified resolution and refresh rate share the first row, scale occupies the second row, and the 0.5× through marker values align with the slider.

  • Verified matching global and connector-specific scale presets and exercised the refresh and dump service IPC events.

  • Ran the repository manifest validator and noctalia plugins lint niri-displays with zero errors or warnings.

  • Tested on Niri

  • Tested on Hyprland

  • Tested on Sway

  • Tested on another compositor:

  • Noctalia version tested against: v5.0.0 (5.0.0_beta.8-1-dirty)

  • Plugin API level: 9

Screenshots / Videos

The thumbnail was produced with the official generator using an AI-assisted, layout-faithful rendering based on the live Niri panel capture.

Niri Displays plugin thumbnail

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.
  • I created thumbnail.webp with the thumbnail generator.
  • 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

Plugins run as trusted, unsandboxed Luau in the user's session. Confirm:

  • The code is readable and not obfuscated, minified, or generated.
  • 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.

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