hyprwm / hyprcursor

The hyprland cursor format, library and utilities.
https://standards.hyprland.org/hyprcursor/
BSD 3-Clause "New" or "Revised" License
376 stars 14 forks source link

Hyprcursor Has Odd Offset Compared to XCursor #49

Closed the-arkhive closed 5 months ago

the-arkhive commented 5 months ago

After much fiddling I have finally gotten my cursor showing as my desired theme on all windows. However I am encountering a small, but frustrating issue. It is tough to really illustrate it, so please bear with my explanation.

To the best of my understanding the problem happens with switching between Xcursor and Hyprcursor. My primary issue for a while was Hyprcursor only being active on what I assume to be Wayland native windows, but applying the same theme to both seemed to fix that. Now whenever I am in a Wayland native window (foot, and Halloy are two examples) the cursor is some 15 pixels above where the pointer actually registers being. This also causes jarring jumps when switching between applications.

I am using nwg-look for XCursor theming, but I also specified XCURSOR environment variables in my hyprland.conf.

env = HYPRCURSOR_THEME,Catppuccin-Mocha-Dark-Cursors
env = HYPRCURSOR_SIZE,24
env = XCURSOR_THEME,catppuccin-mocha-dark-cursors
env = XCURSOR_SIZE,24

I've got a few theories of what could be causing this, but I'm not sure the best way to go about diagnosing the issue. I'm assuming it's possible the actual files for the Hyprcursor catppuccin theme could be wrong by a few pixels. My other thought is some conflict between where nwg-look is storing it's theming data compared to my Hyprland.conf variables.

Any help with this issue is much appreciated.

the-arkhive commented 5 months ago

UPDATE: As I try to keep fiddling with this I seem to be struggling to remove the hyprcursor theme. I have commented out the environment variables and left only the XCursor ones, but those changes are having zero effect.

vaxerski commented 5 months ago

if you have a hyprcursor theme installed hyprland will prefer using those. If you want to get rid of hyprcursor, you can either disable it in the config (for hyprland, https://wiki.hyprland.org/Configuring/Variables/) or remove the themes you installed.

Anyways, this is not a hyprcursor issue, but rather an issue with either your theme or implementation (hyprland I presume)

Try a different theme and see if the issue goes away.

the-arkhive commented 5 months ago

As mentioned I attempted to disable the theme with said environment variables and it persisted. This finally caused me to remove the cursor theme folder within ~/.icons/ at which point hypercursor fell back onto a different variant of the theme I want, but I have no idea where it got it from. This also happened to fix the alignment issue, so I believe that has confirmed it to have to do with the particular version I downloaded.

I will go submit and issue to the specific theme's repo.

Thanks for the help, and if you have any idea where Hyprland might be getting the theme it fell back to I'd appreciate it.

vaxerski commented 5 months ago

Search these: https://github.com/hyprwm/hyprcursor/blob/66d5b46ff94efbfa6fa3d1d1b66735f1779c34a6/libhyprcursor/hyprcursor.cpp#L18-L20