Skip to content

Conversation

@AtefR
Copy link

@AtefR AtefR commented Jan 23, 2026

Summary

  • Add open-sticky window rule to keep a window visible across all workspaces on the current output
  • Add toggle-window-sticky action to toggle stickiness via keybinds
  • Add match is-sticky=true rule for matching sticky windows
  • Expose is_sticky in IPC window info
  • Treat sticky windows as floating for sizing/positioning rules
  • Update docs and hotkey overlay

Testing

  • cargo test -p niri
  • Manual test: open a PiP window with open-sticky true, toggle stickiness via keybind, and verify it stays visible across workspace switches

Notes

  • open-sticky implies open-floating
  • Developed/implemented with assistance from OpenAI Codex; all changes reviewed and tested by me

@HigherOrderLogic
Copy link
Contributor

From a quick skim, this looks like a less-featureful PR compared to #3205, which even supports pinning non-floating window.

@AtefR
Copy link
Author

AtefR commented Jan 23, 2026

From a quick skim, this looks like a less-featureful PR compared to #3205, which even supports pinning non-floating window

the PR actually also allows non picture on picture or non-floating windows to be sticky too, my main objective was to be able to make a picture on picture window or a terminal sticky, I tested both and they're working flawlessly.

I also added the action toggle-window-sticky to allow binding it and is-sticky window matcher

@claymorwan
Copy link

quick question, can sticky windows go above fullscreen windows ?

@Sempyos
Copy link
Member

Sempyos commented Feb 9, 2026

nothing can go above fullscreen windows

@claymorwan
Copy link

nothing can go above fullscreen windows

dam really ? iS there no way at all to have an additional layer above fullscreen window for that ? I do know that wayland layers can do it but ik that it's not exactly the same thing
It'd be really useful to watch videos while playing games for example

@Sempyos
Copy link
Member

Sempyos commented Feb 9, 2026

You can have windows above full width columns, maximized-to-edges, but not fullscreen windows

@YaLTeR
Copy link
Member

YaLTeR commented Feb 10, 2026

A proper sticky impl will go above fullscreen windows. The sticky impl on top of the regular floating layer can't do that

@AtefR
Copy link
Author

AtefR commented Feb 12, 2026

I updated the pull request to show the sticky windows above the fullscreen windows/video players, unsticking a window will make it go back to it's original workspace/position if the position is unavailable it'll go to the nearest position in same workspace.

  • Sticky windows now render above fullscreen windows and receive input correctly in that z-order.
  • window_under/resize hit-testing prioritizes sticky windows consistently.
  • On toggle-window-sticky off, windows restore to their original context:
    • tiling windows return to tiling (original column/position when possible),
    • floating windows return to floating.
  • Restore targets the original workspace, with safe fallback when exact placement is unavailable.
  • Added regression tests for sticky-over-fullscreen hit behavior and sticky restore behavior (column + workspace).

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.

5 participants