feat: focus ring fade animation and gradient rotation#3577
Open
oblivion8282-1337 wants to merge 1 commit intoniri-wm:mainfrom
Open
feat: focus ring fade animation and gradient rotation#3577oblivion8282-1337 wants to merge 1 commit intoniri-wm:mainfrom
oblivion8282-1337 wants to merge 1 commit intoniri-wm:mainfrom
Conversation
Add two new optional animation features for the focus ring:
- Fade: smoothly fades the focus ring in/out on focus changes
using an EaseOutCubic curve. Configurable via `fade-duration-ms`
(default: off, recommended: 500-1000ms).
- Gradient rotation: continuously rotates the gradient angle while
a window is focused. Configurable via `gradient-spin-speed` in
degrees per second (default: off, e.g. 90 for a slow spin).
Both features are opt-in and have no effect unless explicitly
configured in the `focus-ring {}` config block.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
This is amazing! I was looking for something similar for Niri, since it currently doesn't support animated borders. |
|
I haven't been using Niri for long (~3 weeks), but from what I can tell decoration rendering (borders, focus rings, etc.) currently isn't part of the shader pipeline. If decoration rendering could be exposed to shaders, it might enable shader-based effects or animations for borders and focus rings. A shader implementation would give me more control over the type of animation I want of my decorations. I also might be completely wrong with my assumptions, but these are my two cents. |
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.
Summary
Both features are fully opt-in via the
focus-ring {}config block:fade-duration-ms— duration of the fade in/out (0 or omitted = off)gradient-spin-speed— rotation speed in degrees/second (0 or omitted = off)No behavior changes when these options are not set.
Changed files
niri-config/src/appearance.rs— new config fieldssrc/layout/focus_ring.rs— gradient angle offset parametersrc/layout/tile.rs— fade animation + gradient rotation logicsrc/layout/insert_hint_element.rs— pass through new fieldssrc/ui/mru.rs— pass through new fieldsTest plan
🤖 Generated with Claude Code