Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyprcusor util creation fails with error "Failed: (2) failed to add image *.svg to hlc" #16

Closed
shiroryuu opened this issue Mar 25, 2024 · 2 comments

Comments

@shiroryuu
Copy link

Error

Failed: (2) failed to add image hand1.svg to hlc

Steps to reproduce:

I followed Vaxry's blog https://blog.vaxry.net/articles/2024-cursors

  1. Fetch latest version of Bibata Modern
  2. hyprcusor-util --extract
  3. Replace .pngs with svgs
  4. Update corresponding meta.hl
  5. Update Manifest.hl
  6. hyprcusor-util --create

Hyprcursor versions:

  1. master
  2. v0.1.4

Logs

Contents of hand1

LS

hand1.svg
meta.hl

meta.hl

resize_algorithm = bilinear
hotspot_x = 0.56
hotspot_y = 0.25

define_size = 16, hand1.svg
define_size = 20, hand1.svg
define_size = 22, hand1.svg
define_size = 24, hand1.svg
define_size = 28, hand1.svg
define_size = 32, hand1.svg
define_size = 40, hand1.svg
define_size = 48, hand1.svg
define_size = 56, hand1.svg
define_size = 64, hand1.svg
define_size = 72, hand1.svg
define_size = 80, hand1.svg
define_size = 88, hand1.svg
define_size = 96, hand1.svg

define_override = grab
define_override = openhand
hyprcursor Log
hyprcursor-util --create ~/.local/src/xcursors/extracted_Bibata-Modern-Ice_01
Shape hand1:
	overrides: 2
	sizes: 14
Shape copy:
	overrides: 3
	sizes: 14
Shape tcross:
	overrides: 1
	sizes: 14
Shape top_left_corner:
	overrides: 1
	sizes: 14
Shape move:
	overrides: 5
	sizes: 14
Shape dotbox:
	overrides: 4
	sizes: 14
Shape plus:
	overrides: 1
	sizes: 14
Shape grabbing:
	overrides: 4
	sizes: 14
Shape question_arrow:
	overrides: 5
	sizes: 14
Shape fd_double_arrow:
	overrides: 3
	sizes: 14
Shape zoom-in:
	overrides: 0
	sizes: 14
Shape bottom_side:
	overrides: 1
	sizes: 14
Shape crosshair:
	overrides: 0
	sizes: 14
Shape right_side:
	overrides: 1
	sizes: 14
Shape sb_h_double_arrow:
	overrides: 8
	sizes: 14
Shape bd_double_arrow:
	overrides: 3
	sizes: 14
Shape top_right_corner:
	overrides: 1
	sizes: 14
Shape sb_left_arrow:
	overrides: 1
	sizes: 14
Shape crossed_circle:
	overrides: 2
	sizes: 14
Shape ur_angle:
	overrides: 0
	sizes: 14
Shape top_tee:
	overrides: 0
	sizes: 14
Shape bottom_tee:
	overrides: 0
	sizes: 14
Shape left_ptr_watch:
	overrides: 4
	sizes: 742
Shape right_tee:
	overrides: 0
	sizes: 14
Shape hand2:
	overrides: 4
	sizes: 14
Shape pencil:
	overrides: 1
	sizes: 14
Shape cross:
	overrides: 2
	sizes: 14
Shape bottom_left_corner:
	overrides: 1
	sizes: 14
Shape sb_right_arrow:
	overrides: 1
	sizes: 14
Shape right_ptr:
	overrides: 2
	sizes: 14
Shape circle:
	overrides: 1
	sizes: 14
Shape zoom-out:
	overrides: 0
	sizes: 14
Shape pointer-move:
	overrides: 0
	sizes: 14
Shape sb_v_double_arrow:
	overrides: 9
	sizes: 14
Shape dnd-link:
	overrides: 1
	sizes: 14
Shape context-menu:
	overrides: 0
	sizes: 14
Shape wayland-cursor:
	overrides: 0
	sizes: 14
Shape top_side:
	overrides: 1
	sizes: 14
Shape X_cursor:
	overrides: 2
	sizes: 14
Shape wait:
	overrides: 1
	sizes: 742
Shape vertical-text:
	overrides: 0
	sizes: 14
Shape left_tee:
	overrides: 0
	sizes: 14
Shape left_ptr:
	overrides: 3
	sizes: 14
Shape left_side:
	overrides: 1
	sizes: 14
Shape xterm:
	overrides: 2
	sizes: 14
Shape link:
	overrides: 3
	sizes: 14
Shape dnd-ask:
	overrides: 0
	sizes: 14
Shape sb_down_arrow:
	overrides: 1
	sizes: 14
Shape lr_angle:
	overrides: 0
	sizes: 14
Shape bottom_right_corner:
	overrides: 1
	sizes: 14
Shape sb_up_arrow:
	overrides: 1
	sizes: 14
Shape center_ptr:
	overrides: 0
	sizes: 14
Shape ul_angle:
	overrides: 0
	sizes: 14
Shape dnd_no_drop:
	overrides: 1
	sizes: 14
Shape ll_angle:
	overrides: 0
	sizes: 14
Shape dnd-copy:
	overrides: 0
	sizes: 14
About to delete (recursively) /home/arvind/.local/src/xcursors//theme_BibataIce Hyprcursor/, are you sure? [Y/n]
y
Added image hand1.svg to shape hand1
Failed: (2) failed to add image hand1.svg to hlc
@vaxerski
Copy link
Member

svg should always have the size 0, as they do not have a size. Multiple svg will be treated as an animation.

@shiroryuu
Copy link
Author

shiroryuu commented Mar 26, 2024

svg should always have the size 0, as they do not have a size. Multiple svg will be treated as an animation.

Ok!!, That worked

Initially I tried by removing the size as svg didn't use it, Then it had stdoull error then I checked some of the issues and some folks had defined pixel size along with svg and I thought that might be the reason. It wasn't clear from the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants