danth / stylix

System-wide colorscheming and typography for NixOS
https://stylix.danth.me/
MIT License
1.21k stars 155 forks source link

Ability to stop Stylix from starting Hyprpaper service automatically #499

Open AlxTray opened 3 months ago

AlxTray commented 3 months ago

I feel like there should be a way of disabling the Hyprpaper part of the Hyprland module, as I want my Hyprland to be properly themed to my scheme but I have a script that sets wallpapers from a repository manually for me.

I want to be able to launch Hyprpaper and run the script as an exec-once call in Hyprland, but Stylix starts the SystemD Hyprpaper service so this becomes impossible, meaning that my wallpaper is set half of the time as I run into socket issues

trueNAHO commented 3 months ago

I feel like there should be a way of disabling the Hyprpaper part of the Hyprland module

This was enabled by default according to:

This is wrong, hyprpaper works perfectly well as a standalone service for all wlroots-based compositors. It should be a separate target.

Depends whether we're only setting it up when it's already been enabled, or if we're also installing it by default. If we removed the services.hyprpaper.enable = true line then I would support it being separate.

On the other hand, enabling the service automatically is helpful for Hyprland users who expect the wallpaper to "just work".

-- https://github.com/danth/stylix/pull/377#issuecomment-2149968640

I want my Hyprland to be properly themed to my scheme but I have a script that sets wallpapers from a repository manually for me.

I want to be able to launch Hyprpaper and run the script as an exec-once call in Hyprland, but Stylix starts the SystemD Hyprpaper service so this becomes impossible, meaning that my wallpaper is set half of the time as I run into socket issues

Does stylix.targets.hyprland.hyprpaper.enable = false; in https://github.com/danth/stylix/pull/501 resolve this issue?

AlxTray commented 3 months ago

Yup, just tested on your branch and everything hyprpaper was removed upon rebuilding once it was set to false. And once adding hyprpaper manually, my wallpaper script is working perfect so far. So seems to be working to me. Thank you!

AlxTray commented 3 months ago

One thing though is that when hyprpaper is enabled externally, it still attempts to apply the wallpaper as far as I can see. So it may still cause socket problems.

trueNAHO commented 3 months ago

One thing though is that when hyprpaper is enabled externally, it still attempts to apply the wallpaper as far as I can see. So it may still cause socket problems.

The actual Hyprpaper service applies the following settings by default:

https://github.com/danth/stylix/blob/5853f1a8bd072f2ebabfc3de3973084353cf6f1e/modules/hyprpaper/hm.nix#L5-L13

AlxTray commented 3 months ago

Ahh, makes sense. Thank you.

diego-est commented 1 month ago

I'm using stylix on NixOS (i.e. not home-manager) and I still get a build error saying I haven't defined a "hyprpaper service" (I don't use hyprland or hyprpaper). From what I understand, hyprland and hyprpaper are targets for home-manager and not NixOS. Will these targets be reflected on NixOS soon too?

danth commented 1 month ago

@diego-est Please could you send the specific error message you're getting?

diego-est commented 1 month ago

@diego-est Please could you send the specific error message you're getting?

Sorry, in between the time I uploaded this question and now I updated my flake inputs and now it works! (I think my nixpkgs input was just very out of date)