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

hyprland: avoid trivial stylix.targets.hyprpaper.enable collision #700

Conversation

trueNAHO
Copy link
Collaborator

hyprland: avoid trivial stylix.targets.hyprpaper.enable collision

Prevent the following trivial collision when end-users disable the
stylix.targets.hyprpaper.enable option:

    error: The option `stylix.targets.hyprpaper.enable' has conflicting definition values:
    - In `/nix/store/jzqi1jycghqgwcfxr6bkljfdxppkfg3j-source/modules/hyprland/hm.nix': true
    - In `/nix/store/<USER_CONFIGURATION>': false
    Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions.

Prevent the following trivial collision when end-users disable the
stylix.targets.hyprpaper.enable option:

    error: The option `stylix.targets.hyprpaper.enable' has conflicting definition values:
    - In `/nix/store/jzqi1jycghqgwcfxr6bkljfdxppkfg3j-source/modules/hyprland/hm.nix': true
    - In `/nix/store/<USER_CONFIGURATION>': false
    Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions.
@trueNAHO trueNAHO requested a review from danth December 27, 2024 00:36
@danth
Copy link
Owner

danth commented Jan 4, 2025

Would this combination of settings make the hyprland.hyprpaper.enable option ineffective? Since its purpose is to apply the chosen wallpaper to Hyprland by using Hyprpaper, which cannot happen if Hyprpaper theming is disabled.

Perhaps we should assert that hyprland.hyprpaper.enable -> hyprpaper.enable (logical implication) and show a warning if this is not the case? Although that warning would appear under the same conditions that the current error appears.

@trueNAHO
Copy link
Collaborator Author

trueNAHO commented Jan 4, 2025

Would this combination of settings make the hyprland.hyprpaper.enable option ineffective? Since its purpose is to apply the chosen wallpaper to Hyprland by using Hyprpaper, which cannot happen if Hyprpaper theming is disabled.

IIRC, Hyprpaper can also be used as a standalone application outside of Hyprland.

Perhaps we should assert that hyprland.hyprpaper.enable -> hyprpaper.enable (logical implication) and show a warning if this is not the case? Although that warning would appear under the same conditions that the current error appears.

Actually, on second thought this PR is bad. Essentially, stylix.targets.hyprpaper.enable = false; implies that end-users do not want Hyprpaper to set their wallpaper because they maybe use another application. However, they may not be aware that this has the side effect of disabling the wallpaper in Hyprland, which is probably undesired.

For reference, the stylix.targets.hyprland.hyprpaper.enable option should probably be renamed to stylix.targets.hyprland.wallpaper.enable in #717.

I am closing this PR to make this side effect obvious to end-users.

@trueNAHO trueNAHO closed this Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants