LGFae / swww

A Solution to your Wayland Wallpaper Woes
GNU General Public License v3.0
2.38k stars 70 forks source link

Fails to set wallpaper with negative transition-pos #328

Closed rendam closed 5 months ago

rendam commented 5 months ago

I want to animate the wallpaper change based on my current cursor position which does not work when giving a negative value for the --transition-pos parameter. Running on a laptop with the external monitor being the main one aligned to the left of my device, which then results in negative cursor positions due to the alignment of my screens. Running swww 0.9.5 on EndeavourOS with Hyprland.

This call for example does not work: swww img /home/r/.config/swww/wall.png --transition-pos "-1000,1000"

LGFae commented 5 months ago

The --transition-pos coordinates are based on the screen, not the cursor. 0,0 is always the bottom left of the screen. Therefore, negative coordinates do not make sense.

If you want to change the wallpaper based on your cursor position, you will need a more complicated script where you figure out in which output the cursor is currently at, then calculate the relative position of the cursor in that output, and then pass that to swww img.

rendam commented 5 months ago

Interesting. So the issue then stems from how hyprctl provides the cursor position. Thanks for clarification!