# Help with windowrule "move onscreen"

**URL:** <http://forum.hypr.land/t/help-with-windowrule-move-onscreen/1268>\
**Category:** Bugs / FRs / Support\
**Tags:** help, hyprland, feature, config\
**Created:** [January 4, 2026, 10:09am UTC](http://forum.hypr.land/t/help-with-windowrule-move-onscreen/1268 "2026-01-04T10:09:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pysta](http://forum.hypr.land/letter_avatar_proxy/v4/letter/p/2bfe46/32.png) [@Pysta](http://forum.hypr.land/u/Pysta)\
**Post date:** [January 4, 2026, 10:09am UTC](http://forum.hypr.land/t/help-with-windowrule-move-onscreen/1268/1 "2026-01-04T10:09:40Z")

</div>

> **Hyprland version**
>
> ```auto
> Hyprcursor: built against 0.1.13, system has 0.1.13
> Hyprlang: built against 0.6.7, system has 0.6.7
> Aquamarine: built against 0.10.0, system has 0.10.0
> 
> Version ABI string: ea444c35bb23b6e34505ab6753e069de7801cc25_aq_0.10_hu_0.11_hg_0.5_hc_0.1_hlg_0.6
> no flags were set
> 
> ```

## Describe your issue / feature…

Hi all,

before 0.53 I used to have this windowrule:

`windowrule = move onscreen cursor -50% -50%, tag:floaty`

basically to spawn windows at cursor while keeping it onscreen, how can I replicate it on 0.53? Wiki doesn’t seem to mention “onscreen” anymore, I tried blindly putting it everywhere but nothing seemed to work (it still spawns at cursor, but can go outside of screen).

Any alternative/working solution is appreciated

```auto
windowrule {
  name = Floaty
  float = on
  move = onscreen (cursor_x-(window_w*0.5)) (cursor_y-(window_h*0.5))
  match:tag = floaty
}

```

---

<div class="post-metadata">

**Author:** ![Ergon](http://forum.hypr.land/user_avatar/forum.hypr.land/ergon/32/1172_2.png) [@Ergon](http://forum.hypr.land/u/Ergon)\
**Post date:** [January 4, 2026, 1:32pm UTC](http://forum.hypr.land/t/help-with-windowrule-move-onscreen/1268/2 "2026-01-04T13:32:23Z")

</div>

move = max(min(cursor\_x-window\_w,monitor\_w-window\_w),0) max(min(cursor\_y-window\_h,monitor\_h-window\_h),0)

---

<div class="post-metadata">

**Author:** ![Pysta](http://forum.hypr.land/letter_avatar_proxy/v4/letter/p/2bfe46/32.png) [@Pysta](http://forum.hypr.land/u/Pysta)\
**Post date:** [January 5, 2026, 7:42am UTC](http://forum.hypr.land/t/help-with-windowrule-move-onscreen/1268/3 "2026-01-05T07:42:01Z")

</div>

thank you, this seems to work, didn’t know you can use expressions like that. I’ll tweak it a bit and it’ll be perfect
