hyprcursor icon indicating copy to clipboard operation
hyprcursor copied to clipboard

Hyprcursor won't set

Open Ciflire opened this issue 1 year ago • 23 comments

I've been trying to set a cursor theme, it's downloaded, extracted, at the right place. The env vars are in in a config file. But the cursor won't show up, i tried with multiple themes

icons
├── hicolor
│   ├── 128x128
│   ├── 16x16
│   ├── 20x20
│   ├── 24x24
│   ├── 256x256
│   ├── 32x32
│   ├── 48x48
│   ├── 64x64
│   ├── 96x96
│   └── icon-theme.cache
├── HyprBibataModernClassicSVG
│   ├── hyprcursors
│   ├── LICENSE
│   └── manifest.hl
└── rose-pine-hyprcursor
    ├── default.nix
    ├── hyprcursors
    ├── LICENSE
    ├── manifest.hl
    └── README.md

i tried

env = HYPRCURSOR_THEME,HyprBibataModernClassicSVG/rose-pine-hyprcursor
env = HYPRCURSOR_SIZE,32

Also hyprcursor is installed, i have the command hyprcursor-utils in path hyprctl setcursor HyprBibataModernClassicSVG/rose-pine-hyprcursor [any integer] doesn't change anything

Note: the / is just to say i tried with both indidual args

Ciflire avatar Apr 01 '24 21:04 Ciflire

clone this repo compile and run one of the tests. Does a cursor render to /tmp when you run a test?

vaxerski avatar Apr 01 '24 23:04 vaxerski

Sry how do you compile this on NixOS, first time doing this

Ciflire avatar Apr 02 '24 08:04 Ciflire

So I used nix develop then cmake --build . then ctest and got

Test project /home/ciflire/Documents/hyprcursor
    Start 1: Test libhyprcursor in C++
1/2 Test #1: Test libhyprcursor in C++ ........***Failed    0.01 sec
[hc] Skipping path /home/ciflire/.local/share/icons because it's inaccessible.
[hc] Skipping path /home/ciflire/.icons because it's inaccessible.
[hc] Skipping path /usr/share/icons because it's inaccessible.
[hc] getFullPathForThemeName: failed, trying without name of classicFlatHypr
[hc] Skipping path /home/ciflire/.local/share/icons because it's inaccessible.
[hc] Skipping path /home/ciflire/.icons because it's inaccessible.
[hc] Skipping path /usr/share/icons because it's inaccessible.
mgr is invalid

    Start 2: Test libhyprcursor in C
2/2 Test #2: Test libhyprcursor in C ..........***Failed    0.01 sec
[hc] CHyprcursorManager: attempting to find theme from env
[hc] Skipping path /home/ciflire/.local/share/icons because it's inaccessible.
[hc] Skipping path /home/ciflire/.icons because it's inaccessible.
[hc] Skipping path /usr/share/icons because it's inaccessible.
[hc] getFullPathForThemeName: failed, trying without name of HyprBibataModernClassicSVG
[hc] Skipping path /home/ciflire/.local/share/icons because it's inaccessible.
[hc] Skipping path /home/ciflire/.icons because it's inaccessible.
[hc] Skipping path /usr/share/icons because it's inaccessible.
mgr is invalid


0% tests passed, 2 tests failed out of 2

Total Test time (real) =   0.02 sec

The following tests FAILED:
	 1 - Test libhyprcursor in C++ (Failed)
	 2 - Test libhyprcursor in C (Failed)
Errors while running CTest

Ciflire avatar Apr 02 '24 09:04 Ciflire

oh.. nix. @fufexan for nix, hyprcursor doesn't like y'alls paths

vaxerski avatar Apr 02 '24 11:04 vaxerski

that's the problem, those paths do exist, and even with local path for icons it doesn't work

Ciflire avatar Apr 02 '24 11:04 Ciflire

@vaxerski does the fact that some of those paths are symlinks affect anything?

fufexan avatar Apr 02 '24 12:04 fufexan

shouldn't. I think. Feel free to play around with this: https://github.com/hyprwm/hyprcursor/blob/d3876f34779cc03ee51e4aafc0d00a4f187c7544/libhyprcursor/hyprcursor.cpp#L31-L39

vaxerski avatar Apr 02 '24 14:04 vaxerski

and this: https://github.com/hyprwm/hyprcursor/blob/d3876f34779cc03ee51e4aafc0d00a4f187c7544/libhyprcursor/hyprcursor.cpp#L41-L103

vaxerski avatar Apr 02 '24 14:04 vaxerski

oh wait, there is a bug there I think.

vaxerski avatar Apr 02 '24 14:04 vaxerski

try now

vaxerski avatar Apr 02 '24 14:04 vaxerski

everything seems to be good, it passes the test when compiled from source i'm trying to get the last commit running on my pc to get this to work thx to you two

Ciflire avatar Apr 03 '24 12:04 Ciflire

https://github.com/hyprwm/hyprcursor/blob/main/libhyprcursor/hyprcursor.cpp#L17 I think here you should look into an env var like XCURSOR_PATHto find all themes installed, it couldn't work if themes are packaged with nix as they're installed somewhere else (could also be a way to be non exhaustive) Please correct me if i'm wrong i'm trying to be as usefull as i can

Ciflire avatar Apr 03 '24 13:04 Ciflire

With Nix we can have a HM module that links the packages' contents into ~/.local/share/icons.

I can also patch out /usr/share/icons to search in /run/current-system/sw/share/icons.

fufexan avatar Apr 03 '24 15:04 fufexan

Also, with the last commit, this doesn't seem to be working even if it passed all the tests

Ciflire avatar Apr 03 '24 15:04 Ciflire

possibly a nix moment

vaxerski avatar Apr 03 '24 19:04 vaxerski

can i get the logs somewhere? also is there something else to do other than installing the package?

Ciflire avatar Apr 03 '24 19:04 Ciflire

idk, ask @fufexan I don't do nix

vaxerski avatar Apr 03 '24 19:04 vaxerski

@Ciflire is your theme located in ~/.local/share/icons or ~/.icons, or is it in /run/current-system/sw/share?

fufexan avatar Apr 03 '24 20:04 fufexan

it's in ~/.local/share/icons and also ~/.nix-profile/share/icons as i installed it with HM

Ciflire avatar Apr 03 '24 21:04 Ciflire

Can you try overriding the hyprland flake's hyprcursor input to point to the latest commit in this repo?

fufexan avatar Apr 03 '24 21:04 fufexan

    "hyprcursor": {
      "inputs": {
        "hyprlang": "hyprlang",
        "nixpkgs": "nixpkgs_2",
        "systems": "systems_2"
      },
      "locked": {
        "lastModified": 1712068503,
        "narHash": "sha256-xGwCpzMGjqABlJCBSOGxJaDq+M92mRRzBlEqN/8pvCY=",
        "owner": "hyprwm",
        "repo": "hyprcursor",
        "rev": "752cc4477918b3f0ad3987a63a78efad767cdb57",
        "type": "github"
      },
      "original": {
        "owner": "hyprwm",
        "repo": "hyprcursor",
        "type": "github"
      }
    },

Correct me if i'm wrong but i think it's already the case

Ciflire avatar Apr 03 '24 21:04 Ciflire

Looks like it, yes.

I don't have a hyprcursor theme set up yet, but I'll try to set one and see whether I'm facing the same issue.

fufexan avatar Apr 04 '24 05:04 fufexan

same issue, using latest commit. hyprcusr wont set

shivajreddy avatar May 22 '24 12:05 shivajreddy

Facing same issue. @fufexan any updates?

DeathStroke19891 avatar May 29 '24 02:05 DeathStroke19891

It is a symlink issue it seems. Home manager creates a symlink in $XDG_DATA_HOME/icons/Catppuccin-*, but it points to a file that does not exists.

# Home Manager symlink
$ ls -l ~/.local/share/icons/Catppuccin-*
lrwxrwxrwx - vini 11 jun 14:39 /home/vini/.local/share/icons/Catppuccin-Mocha-Dark -> /nix/store/g08j18g5zj4br2vq6h1blxjsc6hgfn5c-home-manager-files/.local/share/icons/Catppuccin-Mocha-Dark

# Broken symlink in /nix/store
$ ls -l /nix/store/g08j18g5zj4br2vq6h1blxjsc6hgfn5c-home-manager-files/.local/share/icons/Cat
ppuccin-Mocha-Dark
lrwxrwxrwx - root 31 dez  1969 /nix/store/g08j18g5zj4br2vq6h1blxjsc6hgfn5c-home-manager-files/.local/share/icons/Catppuccin-Mocha-Dark -> /nix/store/rk1bpsr2di766wy9z7j29rvclp0smvqy-catppuccin-cursors-0.3.0-mochaDark/share/icons/Catppuccin-Mocha-Dark

# Actual contents
$ ls -l /nix/store/rk1bpsr2di766wy9z7j29rvclp0smvqy-catppuccin-cursors-0.3.0-mochaDark/share/icons/
dr-xr-xr-x - root 31 dez  1969 catppuccin-mocha-dark-cursors

vinicius507 avatar Jun 11 '24 17:06 vinicius507

Facing same issue. @fufexan any updates?

@DeathStroke19891 Yes, everything is working as expected. For more info about how I set it up, see https://github.com/fufexan/dotfiles/commit/78ce01ba573e6eab975498899dc72b3ea1e8523e and https://github.com/fufexan/dotfiles/commit/79b0686a1f08ba3a91ef59d3b61812817affaf5a.

It is a symlink issue it seems. Home manager creates a symlink in $XDG_DATA_HOME/icons/Catppuccin-*, but it points to a file that does not exists.

@vinicius507 all that means is that the pointerCursor.name wasn't set according to the actual contents of the package.

fufexan avatar Jun 13 '24 21:06 fufexan