Skip to content

Conversation

@perstarkse
Copy link

@perstarkse perstarkse commented Nov 29, 2025

Hi,

Resubmitting as a superceeding PR since in the previous PR #2804 the user sashaduke had a feature request. When considering it, I felt integrating it made a lot of sense, since they share a lot of overlap.

This PR introduces two complementary features.
1, Smooth opacity transitions when changing focus between two windows of different opacity. Requested in #1801.
2, Focus flash, as discussed in #2804 and #1380, which provides visual feedback via a short opacity change when a window is focused. Making it easier to see which window is focused. Especially when not using borders or focus rings.

niri-demo-vp9-crf26.webm

The new settings goes into the layout block

layout {
    opacity-transition {
        on                    // Enable smooth transitions
        duration-ms 350       // Animation duration for both transitions and flash
        flash {
            on                // Enable focus flash effect
            flash-opacity 0.8 // Target opacity during flash (0.0 - 1.0)
            disable-on-solo   // Optional: disable flash for solo windows
        }
    }
}

@sashaduke
Copy link

Great work, many have requested this and it builds a solid foundation for future related work/features. Big +1 from me

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.

2 participants