Skip to content

Conversation

@CodeTriangle
Copy link

Rationale

The hot corner feature is very useful but I end up triggering it all the time when I do not mean to. This PR implements a configurable short delay during which the cursor must be held in the hot corner before the overview is opened, similar to KDE's hot corner functionality.

Changes

  • Added the field open-delay-ms to the hot-corners configuration object.
  • The overview opening is now controlled by a callback triggering open-delay-ms milliseconds after the cursor enters the hot corner region. The callback is canceled upon leaving the hot corner region.
  • To aid the user in positioning the cursor in the hot corner for the full time, two new options have been added to the hot-corners configuration object, open-region-width and open-region-height.
  • The hot corner triggers if the cursor is within open-region-width horizontal pixels of the corner and open-region-height vertical pixels of the corner.

Remarks

This PR is functional, but I am not fully satisfied with the code quality. Reviews are heavily requested to ensure that the code conforms to the style preferred by active niri developers. I think that my additions to the hot corners configuration could certainly be cleaned up, but I got lost in the complexity of changing the configuration format too much.

This PR also provides no documentation or tests. This is intentional as through the review process the exact form of the feature and its configuration is liable to change. I will write both, but I may need guidance through some aspects.

I have tested the code on my end, however, and a screencast showing the correct functioning of all added features will be forthcoming.

@HigherOrderLogic
Copy link
Contributor

I believe hot corners with some kind of barrier (#1473) is more approriated here.

@CodeTriangle
Copy link
Author

Screencast, as promised:

2025-12-05.18-09-57.mp4

@CodeTriangle
Copy link
Author

I believe hot corners with some kind of barrier (#1473) is more approriated here.

Perhaps. My PR is certainly not the only solution to this problem, and it's certainly not the most sophisticated possible solution. For now, I will be using my version, whether or not it gets merged.

@YaLTeR
Copy link
Owner

YaLTeR commented Dec 6, 2025

Yeah I'd like to eventually go with a barrier for niri, not delay.

@CodeTriangle
Copy link
Author

Fair enough. Feel free to close this PR, then.

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.

3 participants