Skip to content

stylix: set and gate home.pointerCursor.enable#2407

Open
panchoh wants to merge 4 commits into
nix-community:masterfrom
panchoh:fix/stylix--set-home-pointerCursor-enable
Open

stylix: set and gate home.pointerCursor.enable#2407
panchoh wants to merge 4 commits into
nix-community:masterfrom
panchoh:fix/stylix--set-home-pointerCursor-enable

Conversation

@panchoh

@panchoh panchoh commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

… to silence warning:

Warning

Relying on home.pointerCursor to enable cursor config generation is deprecated.
Please update your configuration to explicitly set:

home.pointerCursor.enable = true|false;

This happens because legacy enable of home.pointerCursor has been dropped. See:

I’ve also gated it as well as individual namespaces (x11, gtk, sway) to honour the targets system.


NOT TO BE BACKPORTED: since only applies to Home Manager changes from its master branch.

@stylix-automation stylix-automation Bot added topic: home-manager Home Manager target topic: flake /flake.nix, /flake.lock, and /flake/ subsystems topic: stylix /stylix/ subsystem labels Jul 8, 2026
@panchoh panchoh marked this pull request as ready for review July 8, 2026 21:33
@panchoh panchoh requested a review from Flameopathic July 8, 2026 21:33
@panchoh panchoh changed the title stylix: set home.pointerCursor.enable stylix: set and gate home.pointerCursor.enable Jul 9, 2026
@stylix-automation stylix-automation Bot added the topic: modules /modules/ subsystem label Jul 9, 2026
MrSom3body added a commit to MrSom3body/dotfiles that referenced this pull request Jul 9, 2026
vMohammad24 added a commit to vMohammad24/nixos-config that referenced this pull request Jul 9, 2026

@mightyiam mightyiam left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the single question, looks good to me. Thank you for splitting it into multiple commits.

Comment thread stylix/hm/cursor.nix
Comment on lines -23 to +25
x11.enable = true;
gtk.enable = true;
x11.enable = config.stylix.targets.xresources.enable;
gtk.enable = config.stylix.targets.gtk.enable;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seem to be also dotIcons, hyprCursor and sway. Why shouldn't we enable them?

@panchoh panchoh Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

By default, apps should look in $HOME/.icons (for backwards compatibility), (…)

so I figured that if that were to change in the future (unlikely, but I digress), Home Manager would be the natural layer to take care of it, not Stylix.

  • and, last but not least, hyprcursor: I did not enable it because Stylix currently doesn’t support it. So we would end up feeding Hyprland the config of a hyprcursor that is not really a hyprcursor, but a good ole Xcursor.

I thought it better to wait until:

a) more hyprcursor cursor packages are available and packaged 1, and/or

b) Home Manager is able to support them distinctly. As it is now, there is only one cursor theme package that can be set, via home.pointerCursor.package. The only provision to differenciate the backends is given to size. So, package can be set to either an Xcursor (most of them are, some 1800 and change) or a hyprcursor (just the one, rose-pine-hyprcursor, plus nordzy-cursors-theme2 that supports both formats) so, if we enable both the Xcursor and the hyprcursor backends, one camp is going to be fed the incorrect format.

Clearly, this is a shortcoming of Home Manager’s pointerCursorModule, and should be fixed in Home Manager first, to be able to specify a separate package for the hyprcursor backend. And only then can Stylix safely add support to set this hypothetical home.pointerCursor.hyprcursor.package, as well as the then properly scoped home.pointerCursor.hyprcursor.enable. Maybe via a new stylix.hyprcursor.* set of options.

To be clear, with the status quo, properly setting a hyprcursor cursor theme can be done, but that would imply disabling the other (Xcursor-based) backends (x11, gtk, sway), as well as dotIcons. And since only Hyprland is able to consume hyprcursor for now, the rest of the apps that don’t support server-side cursors are going to be running on built-in defaults, which is, as we know, Not Nice™.

Phew!, that was a mouthful… 😅

EDIT: (With Yoda’s voice) There is another2… So the challenge is going to be for users to be able to determine which formats a given cursor theme package supports...

Footnotes

  1. Currently, there is just the one

  2. Nordzy-cursors 2

unazikx added a commit to unazikx/flake that referenced this pull request Jul 13, 2026
github-actions Bot added a commit to LorenzBischof/nixfiles that referenced this pull request Jul 13, 2026
…tion

home-manager now warns when home.pointerCursor is relied on implicitly
(nix-community/home-manager#9620); stylix sets cursor.{name,size,package}
for the framework/lbischof profile but not .enable yet
(nix-community/stylix#2407 is pending). Setting it explicitly preserves
current behavior and clears the warning surfaced by this flake bump.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
panchoh added 4 commits July 14, 2026 23:28
… to silence warning:

    Relying on 'home.pointerCursor' to enable cursor config generation is deprecated.
    Please update your configuration to explicitly set:

      home.pointerCursor.enable = true|false;

This happens because legacy enable of home.pointerCursor has been dropped. See:

- nix-community/home-manager@2ad4996
- nix-community/home-manager@1aac889
Instead of setting them unconditionally, honour the 'targets' system.
This also makes consistent use of the size calculation, same as the
other namespaces.
@panchoh panchoh force-pushed the fix/stylix--set-home-pointerCursor-enable branch from f9d7ad6 to 82d3218 Compare July 14, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: flake /flake.nix, /flake.lock, and /flake/ subsystems topic: home-manager Home Manager target topic: modules /modules/ subsystem topic: stylix /stylix/ subsystem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants