VirtCode / hypr-dynamic-cursors

a plugin to make your hyprland cursor more realistic, also adds shake to find
MIT License
72 stars 1 forks source link

Rotate mode point up #4

Closed nnra6864 closed 1 week ago

nnra6864 commented 1 week ago

Hi, I enjoy using the rotate mode a lot, with the main issue being the default pointer tilt. I tried fixing this myself by adding the following line to /mode/ModeRotate.cpp after all the calculations: angle += 30 This did absolutely nothing tho. I tried different values and subtracting instead, but nothing. This would be a nice config option for people using the rotate mode.

VirtCode commented 1 week ago

Hmm, weird that those changes did not have any effect.

Anyways, I've implemented a quick config option under plugin:dynamic-cursors:rotate:offset, which is a clockwise offset applied to the angle in degrees. Hope this suits your needs.

As a sidenote, this is more of a temporary solution. Whilst a hard offset might look good with e.g. the pointer, the same offset won't look good with the e.g. text selector cursor. I plan to add shape dependent offsets etc. but that's probably gonna take a while and won't be entirely possible in all cases because wayland cursors are a mess (server- and clientside cursors).

nnra6864 commented 1 week ago

Hi, thanks a lot for implementing this one! I just tested it out and it works perfectly. I find the value of 21 to work the best. This is already a huge improvement but it'd be neat if it was applied to the default shape only. I am glad to hear you are planning to implement that at some point and wish you the best of luck!

VirtCode commented 5 days ago

FYI, I've just implemented shape rules which allow specifying the offset on a per shape basis (as long as the shape is server side). See the section about them in the readme.

nnra6864 commented 5 days ago

Hey, thanks a lot for making this feature! I played around with it for a bit and it's really good but apps break the effect quickly. Best results are with either:

mode = rotate
shaperule = default, rotate, rotate:offset: 21

Where it will look mostly good but slightly tilted on apps that don't use the server side cursor or:

mode = rotate
rotate:offset = 21

Where the default cursor would look fine everywhere but others would be slightly tilted. I am gonna stick with the first one for now but both are viable. Thanks again for making this great plugin!