Add niri-animations plugin - #223
Merged
Merged
Conversation
Animation preset picker for niri: choose a .kdl preset, set the global slowdown factor, or turn animations off. Ships a floating and a bar-attached panel plus a control-center tile. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Plugin
imjustdoingmypart/niri-animationsplugin.toml)What it does
Lets you switch niri animation presets from a Noctalia panel instead of editing config and
reloading the compositor by hand.
The plugin owns one file —
~/.config/niri/animations.kdlby default — and rewrites it withan
includefor the chosen preset plus ananimationsblock carrying the global speed:Then it runs the reload command. It never touches
config.kdl; that file is expected toinclude the target file last, after your base animations.
The panel offers a preset dropdown (plus No preset, which falls back to your base pack), an
on/off toggle, a 0.25×–3.00× speed slider, and a Random button. Two panel entries ship the
same script with different anchoring —
pickerfloating anddockedattached to the bar —because
placementis host-owned and cannot be changed at runtime or overridden by the user.A control-center tile opens the attached one and highlights while animations are enabled.
Presets are listed by filename on purpose: preset headers carry a free-form
Desc:fieldthat is frequently just "imported from https://…", and surfacing it makes the plugin look
broken when the problem is somebody else's metadata.
External dependencies
niri— used for the reload command (niri msg action load-config-file, configurable).Declared in
dependenciesinplugin.toml. No other external commands, and no networkaccess.
Testing
Exercised on a live session against 19 presets:
Opened both panels via IPC (
panel-toggle …:pickerand…:docked) and confirmed eachregisters and renders.
Picked presets from the dropdown, toggled animations off and on, moved the speed slider,
and used Random — verifying each writes the target file and that niri reloads.
Confirmed the panel reopens reflecting the on-disk state (selected preset, speed, on/off)
after external edits to the target file.
Validated all three generated shapes (preset + slowdown, no preset + slowdown,
off)with
niri validateagainst a full config tree.Verified the control-center tile reflects the enabled/disabled state.
Tested on Niri
Tested on Hyprland
Tested on Sway
Tested on another compositor:
Noctalia version tested against: 5.0.0-beta.7 (
noctalia v5.0.0 (97917d9ca07e))Plugin API level: 9
Screenshots / Videos
thumbnail.webpin this PR embeds a live capture of thepickerpanel (preset dropdown ontv_crt, speed at 1.00×, 19 presets discovered). Full-resolution screenshots of both thefloating and bar-attached variants follow in a comment.
Checklist
idafter the/inplugin.tomlexactly.plugin.toml,README.md,thumbnail.webp, andtranslations/en.json.README.mdfollows theREADME template, documents
every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.
thumbnail.webpwith the thumbnail generator.versionfollows semver and is bumped in this PR;plugin_apiis the oldest API levelthis plugin requires.
can read, write, and understand that language well enough to review and maintain it (no
unreviewed machine/LLM translations).
catalog.toml; CI generates it.Code review attestation
above accounts for.
licensedeclared inplugin.toml.