GithubHelp home page GithubHelp logo

Comments (12)

Mange avatar Mange commented on August 26, 2024 6

I'm not sure I get it, still.

Here's what the generated config will do:

  1. The environment variables are set up with the user's values.

    home.sessionVariables = lib.mkIf pointerCursor.enable {
    HYPRCURSOR_SIZE = "24";
    HYPRCURSOR_THEME = "catppuccin-${pointerCursor.flavor}-${pointerCursor.accent}-cursors";

  2. Hyprland is then injected with statements that overwrite those values with placeholders.

    ++ lib.optionals pointerCursor.enable [
    (builtins.toFile "hyprland-cursors.conf" ''
    env = HYPRCURSOR_THEME,MyCursor
    env = HYPRCURSOR_SIZE,24
    '')
    ];

So spawning hyprcursor as a normal user will see the correct environment variables, but the Hyprland process, and any children spawned by it, will see MyCursor instead of the real value.

Why? Should I manually add env= statements to my extra config after this to go back to the real values again?

from nix.

isabelroses avatar isabelroses commented on August 26, 2024 1
  1. Automatically enables hyprcursors

No... thats just hyprland having hyprcursor enabled by default, you can disable it like so.

cursor {
  enable_hyprcursor = false
}

See https://wiki.hyprland.org/Configuring/Variables/#cursor

 › cat /nix/store/aan4vsxbqpg5y6l6nyqw91hk217sbnpq-hyprland-cursors.conf  
 env = HYPRCURSOR_THEME,MyCursor
 env = HYPRCURSOR_SIZE,24

After a bit of reading I see that MyCursor would be the fall back so we can just set that also to catppuccin-${cursor.flavor}-${cursor.accent}-cursors".

P.S. hardcoding 24 cursor size here also doesn't seem to be correct.

This we can mkDefault to fix that issue.

As a side note my best guess as to why its failing for you is because you're using an older version of nixpkgs that does not have the hyprcursor theme.

from nix.

Different-Name avatar Different-Name commented on August 26, 2024 1

I'm on a recent commit of the unstable branch - NixOS/nixpkgs@e9ee548

from nix.

isabelroses avatar isabelroses commented on August 26, 2024

Why do you have the example config still is my only question. Should you have removed that when configuring your config. wayland.windowManager.hyprland.settings or perhaps using wayland.windowManager.hyprland.extraConfig?

from nix.

Different-Name avatar Different-Name commented on August 26, 2024

I'm not sure what you mean. I haven't provided my config, I've only referenced the module provided by this repo

from nix.

isabelroses avatar isabelroses commented on August 26, 2024

Yeah, but when you use either those modules, or even create your own ~/.config/hypr/hyprland.conf file the default example settings won't exist anymore. So I cannot see how this could be an issue.

from nix.

Different-Name avatar Different-Name commented on August 26, 2024

I have my own config set up through home manager using wayland.windowManager.hyprland.settings
I am not using hyperland's default configuration
The hyprland module from this repo is adding the example code I linked into my configuration file, shown by the line I referenced in the issue
Am I missing a setting in the module?

from nix.

danielgafni avatar danielgafni commented on August 26, 2024

I'm experiencing exactly the same problem. I was wondering why did my cursor break without me touching any settings around it.

Turns out, the hyprland module from cattpuccin-nix

  1. Automatically enables hyprcursors
  2. Adds an import to my hyprland.conf like:
source=/nix/store/aan4vsxbqpg5y6l6nyqw91hk217sbnpq-hyprland-cursors.conf

And the referenced file contains:

› cat /nix/store/aan4vsxbqpg5y6l6nyqw91hk217sbnpq-hyprland-cursors.conf  
env = HYPRCURSOR_THEME,MyCursor
env = HYPRCURSOR_SIZE,24

I can see this is done here.

P.S. hardcoding 24 cursor size here also doesn't seem to be correct.

from nix.

Different-Name avatar Different-Name commented on August 26, 2024

Yes, this is the same issue I am experiencing. I believe it is a fault with the module @isabelroses

from nix.

danielgafni avatar danielgafni commented on August 26, 2024

Oh, thanks, I didn't know hyprland enabled hyprcursors by default.

As a side note my best guess as to why its failing for you is because you're using an older version of nixpkgs that does not have the hyprcursor theme.

Nope, I'm on unstable and I have these packages built.

I believe the problem was (partially) in using the old cursor theme name with capital letters. I changed it to lowercase and the cursor works now.

However, I'm not sure if I've done everything correctly. I don't even think hyprcursors is picking anything up at all, because HYPRCURSOR_SIZE and HYPRCURSOR_THEME does not affect anything.

Only home.pointerCursor.name & ome.pointerCursor.package affect the theme generated in ~/.icons / ~/.local/share/icons.

Honestly, I'm quite confused by relations between home.pointerCursor, gtk.cursorTheme, and gtk.catppuccin.cursor.

gtk.catppuccin.cursor is setting HYPRCURSOR_THEME, but again, it's not really being picked up by hyprland. Clearly something is wrong on my side...

I believe I still have an xcursor cursor in use.

from nix.

isabelroses avatar isabelroses commented on August 26, 2024

I believe the problem was (partially) in using the old cursor theme name with capital letters. I changed it to lowercase and the cursor works now.

Casing will be the downfall of catppuccin istg.

Honestly, I'm quite confused by relations between home.pointerCursor, gtk.cursorTheme, and gtk.catppuccin.cursor.

home.pointerCursor Is a global alias in home-manager to setup all the cursor theming, which includes gtk.cursorTheme, catppuccin's gtk.catppuccin.cursor applies only the gtk.cursorTheme and not globally unlike home.pointerCursor which is why #195 exists.

from nix.

danielgafni avatar danielgafni commented on August 26, 2024

Thank you for the explanation!

from nix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.