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

querying for overridden cursor (from xcursor with symlink) fails tests #65

Closed earboxer closed 2 months ago

earboxer commented 2 months ago

Many xcursor themes use symlinks to point the same name to other icons

The tests fail when using a cursor created using hyprcursor-util which had symlinks, like

failed querying left_ptr

(as an example, here are the contents of /usr/share/icons/Adwaita/cursors on my system)

alias
all-scroll
arrow -> default
bd_double_arrow -> nwse-resize
bottom_left_corner -> sw-resize
bottom_right_corner -> se-resize
bottom_side -> s-resize
cell
col-resize
context-menu
copy
cross -> crosshair
cross_reverse -> crosshair
crosshair
default
diamond_cross -> crosshair
dnd-move -> default
e-resize
ew-resize
fd_double_arrow -> nesw-resize
fleur -> move
grab
grabbing
hand1 -> grab
hand2 -> pointer
help
left_ptr -> default
left_side -> w-resize
move
n-resize
ne-resize
nesw-resize
no-drop
not-allowed
ns-resize
nw-resize
nwse-resize
pointer
progress
question_arrow -> help
right_side -> e-resize
row-resize
s-resize
sb_h_double_arrow -> ew-resize
sb_v_double_arrow -> ns-resize
se-resize
sw-resize
tcross -> crosshair
text
top_left_arrow -> default
top_left_corner -> nw-resize
top_right_corner -> ne-resize
top_side -> n-resize
vertical-text
w-resize
wait
watch -> wait
xterm -> text
zoom-in
zoom-out
vaxerski commented 2 months ago

you mean fails the C test? I can see that one is missing the check, the C++ ones dont

vaxerski commented 2 months ago

patch.txt try this

earboxer commented 2 months ago

you mean fails the C test? I can see that one is missing the check, the C++ ones dont

Both ./hyprcursor_test2 and ./hyprcursor_test_c are failing

With your patch, now ./hyprcursor_test_c fails with

theme has no left_ptr images

vaxerski commented 2 months ago

wat

vaxerski commented 2 months ago

can you send the theme

earboxer commented 2 months ago

Here's the created theme: theme_Adwaita.zip

and here's the source: Adwaita.zip

Created it like so:

./hyprcursor-util -x /usr/share/icons/Adwaita/ -o ./
sed -i "s/name = .*/name = Adwaita/g" extracted_Adwaita/manifest.hl
./hyprcursor-util -c ./extracted_Adwaita/ -o ~/.local/share/icons/
vaxerski commented 2 months ago

fixed

vaxerski commented 2 months ago

https://github.com/hyprwm/hyprcursor/commit/d60e1e01e6e6633ef1c87148b9137cc1dd39263d https://github.com/hyprwm/hyprcursor/commit/5729b9733dd73b0dc1896179e51b6b0c2d92f44c