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

ReGreet not using GTK or cursor theme #690

Open
yazoink opened this issue Dec 20, 2024 · 11 comments
Open

ReGreet not using GTK or cursor theme #690

yazoink opened this issue Dec 20, 2024 · 11 comments
Labels
bug Something isn't working properly

Comments

@yazoink
Copy link

yazoink commented Dec 20, 2024

It's using the correct font and wallpaper but the GTK colors and cursor theme have not been applied.

Edit: on further inspection, it's not using the correct font

@trueNAHO trueNAHO added the bug Something isn't working properly label Dec 21, 2024
@trueNAHO
Copy link
Collaborator

Cc: @Mikilio

@Mikilio
Copy link
Contributor

Mikilio commented Dec 22, 2024

Currently Regreet is only themed by copying the configuration for GTK and applying it to Regreet. If that is not working then it means there is a good reason to create a mustache file for regreet only. If I am to do that I'd like to do it properly, so it takes me more than just a few minutes.

@Mikilio
Copy link
Contributor

Mikilio commented Dec 24, 2024

Waiting for NixOS/nixpkgs#367520 to close so I can use demo mode instead of rebooting to see a css.

@Mikilio
Copy link
Contributor

Mikilio commented Dec 30, 2024

I can't reproduce the issue. After taking a look at the code again, I realized that I specified fonts icons and cursor using nixos options.

@yazoink, can you maybe send me the stylix related options you are using?

@yazoink
Copy link
Author

yazoink commented Jan 1, 2025

Here and here are my stylix options and this is how I set up regreet (after I found that the theme wouldn't apply without any extra CSS passed to it I tried a few different ways of trying to get it to work like passing the generated gtk.css directly to regreet, as well as what I have currently but nothing has worked).

@Mikilio
Copy link
Contributor

Mikilio commented Jan 2, 2025

A few infos I'd like to provide in advance:

  • If you overwrite programs.regreet.extraCss with mkForce you simply overwrite the entire css that stylix defines with your own, which I believe is not what you're trying to do if you want to extend the config writing stuff into stylix.gtk.extraCss is the way to go, though I admit, that could be improved.
  • regarding your Regreet and greetd config, something like the following is enough to set up greetd with Regreet while having it styled only by stylix:
 programs.regreet = {
   enable = true;
 };
  • The font used for UI is sansSerif because of the styling guide and because serifs are hideous on UI, so only that really impacts how fonts look on Regreet.

To follow up, I recommend removing the clutter from your configuration and tweaking stylix.fonts.sansSerif to see if that changes your font.

If it does not change your font, I believe you will be forced to debug this using nix repl after loading your config with :lf . you can check the values of your config after evaluation with nixosConfigurations.cyberia.config.<ENTER-YOUR-KEY>.

@yazoink
Copy link
Author

yazoink commented Jan 3, 2025

It's not being themed even without the programs.regreet.extraCss. This is what I have currently:

 programs.regreet = {
   enable = true;
 };
 services.greetd = {
   enable = true;
   settings = {
     default_session = {
       command = "${lib.getExe pkgs.cage} -s -- ${lib.getExe config.programs.regreet.package}";
       user = "greeter";
     };
   };
 };

@Mikilio
Copy link
Contributor

Mikilio commented Jan 3, 2025

Thank you for your patience! I was able to find the error, it seems my regreet was being styled by GTK through importing correct environment variables, not through extraCss.

As a tip for your config, I would recommend removing everything under services.greetd as that is not needed and is actually missing parts from the default that is already quite minimal.

@Mikilio
Copy link
Contributor

Mikilio commented Jan 3, 2025

Even without the above change, Regreet will be themed with the global GTK settings, if use the default value for services.greetd.settings.default_session.command that is set when programs.regreet.enable = true.

It will set up the dbus environment which will firstly prevent a known issue affecting ReGreet.
Since in nixpkgs this is activated by default, I think it is sensible to assume that if deliberately turned it off a user is aware of its implications.

I could still not replicate your issue with fonts.
Could you report what happens when you change sansSerif fonts in stylix?

@yazoink
Copy link
Author

yazoink commented Jan 4, 2025

It's using the correct cursor theme and font now but the GTK theme still isn't working. This is my current config for regreet/greetd:

programs.regreet = {
  enable = true;
};

Am I missing something?

@Mikilio
Copy link
Contributor

Mikilio commented Jan 6, 2025

To rule out that it is some light or dark mode issue, it would be helpful if you could try the PR. It should also get merged soon.

trueNAHO pushed a commit that referenced this issue Jan 7, 2025
Respect the stylix.polarity option and unset programs.regreet.extraCss
to enable custom styling.

This partially resolves the "ReGreet not using GTK or cursor theme" [1]
issue.

[1]: #690

Link: #723

Reviewed-by: NAHO <[email protected]>
stylix-automation bot pushed a commit that referenced this issue Jan 7, 2025
Respect the stylix.polarity option and unset programs.regreet.extraCss
to enable custom styling.

This partially resolves the "ReGreet not using GTK or cursor theme" [1]
issue.

[1]: #690

Link: #723

Reviewed-by: NAHO <[email protected]>
(cherry picked from commit 5c84f02)
trueNAHO pushed a commit that referenced this issue Jan 7, 2025
Respect the stylix.polarity option and unset programs.regreet.extraCss
to enable custom styling.

This partially resolves the "ReGreet not using GTK or cursor theme" [1]
issue.

[1]: #690

Link: #723

Reviewed-by: NAHO <[email protected]>
(cherry picked from commit 5c84f02)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working properly
Projects
None yet
Development

No branches or pull requests

3 participants