-
-
Notifications
You must be signed in to change notification settings - Fork 186
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
treewide: make stylix.image
optional
#717
base: master
Are you sure you want to change the base?
Conversation
63b1088
to
0245402
Compare
This PR could be mostly generated with: fd -e nix -X sed -i 's/config\.stylix\.image/lib.mkIf (\0 != null) \0'
I suggest adding an
Consistently wrapping with For reference, #442 might contain more practical information. |
i'll test it out doing just that, though it seems more complicated than the rest
good idea, done
sounds good and makes sense; why do anything more complicated
ah, hadn't noticed it. are you interested in me adding the proposed wallpaper option for every module that uses |
aa17ed3
to
f7e7cbc
Compare
Yes. |
6693243
to
2b2b059
Compare
can't seem to get KDE themed, even with an image using the official release of stylix. is it known to be broken? either way it may be best to, for the moment, disable KDE theming when there is no image, as #708 looks like it's about to change the module entirely |
ce128e9
to
64a5bb9
Compare
set up individual toggles. failing to set i still need help with KDE for reasons explained previously testing of all other modules in progress |
Yeah, KDE theme activation is currently broken for any setup where the activation isn't run inside a Plasma session. I think it'll be sufficient to just guard the if-block in the activator script and the magick-related commands in the |
got it, thanks
awesome, double thanks |
Can you elaborate? I assume the following should be the pattern: {
config,
lib,
...
}: let
target = "<TARGET>";
in {
options.stylix.targets.${target} = {
enable = config.lib.stylix.mkEnableTarget target true;
# TODO: Define config.lib.stylix.mkEnableWallpaper with an appropriate
# description.
wallpaper = config.lib.stylix.mkEnableWallpaper target true;
};
config = let
cfg = config.stylix.targets.${target};
in
lib.mkIf (config.stylix.enable && cfg.enable) {
programs.${target} = {
enable = true;
wallpaper =
lib.mkIf
(cfg.wallpaper && config.stylix.image != null)
config.stylix.image;
};
};
} Extracting the hard-coded I could quickly do this in a separate PR, but getting my PRs merged takes quiet long since danth is rather slow to respond. However, keeping that commit in this PR will be rather annoying, since we need to resolve breaking changes with new modules introduced in master... |
I must have misunderstood what you wanted in #442, i just added an option to every module that uses the wallpaper. |
Your approach looks good. Sorry for the confusion. |
Cross-post:
|
implemented |
0a305ef
to
f48cab3
Compare
0ddea4a
to
833cbbd
Compare
should be fixed
I appreciate your active reviewing. I made many mistakes, so thank you for your patience! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optionalizing the wallpaper functionality was surprisingly more involving than expected. Thanks a lot [Flameopathic] for your continuous efforts in implementing the most requested Stylix feature.
I appreciate your active reviewing. I made many mistakes, so thank you for your patience!
Glad I could help :)
1acbe2b
to
8d5c5d1
Compare
Seems working based on the testbeds - is there anything specific you would like me to check? Only things I noticed are:
However I think these could both be worked on after merging rather than delaying this PR. |
Nothing specific. An additional review on this major PR would not be bad.
Agreed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've read through the code changes in detail: assume anything not commented on LGTM.
Should we merge this PR as-is then? |
i'm a little unclear on what @danth meant by
do you mean that no more changes are necessary and your conversations are moot or that we just shouldn't mess with adding |
Co-authored-by: NAHO <[email protected]>
Co-authored-by: NAHO <[email protected]>
Co-authored-by: NAHO <[email protected]>
c4e7b2c
to
6f73f00
Compare
either way, i removed I'm not sure what's going on with the checks, though. |
This is what I meant :)
This seems to be related to #861: https://github.com/danth/stylix/actions/runs/13435736838/job/37537466901#step:3:279 Although I'm not sure why this is failing (or why the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I'm not sure why this is failing (or why the
get-derivations
job shows as success despite the error)
This should be resolved in #888.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I would squash merge this PR with the following commit message:
treewide: optionalize stylix.image option Optionalize the stylix.image option when stylix.base16Scheme is set, making the following Stylix configurations valid: [ // Now it possible to set 'stylix.image = null', if // stylix.base16Scheme is set. { base16Scheme = /* ... */; } // This configuration was already possible. { image = /* ... */; } // This configuration was already possible. { base16Scheme = /* ... */; image = /* ... */; } ] Closes: https://github.com/danth/stylix/issues/200 Closes: https://github.com/danth/stylix/issues/442 Link: https://github.com/danth/stylix/pull/717 Co-authored-by: NAHO <[email protected]> Reviewed-by: NAHO <[email protected]> Tested-by: NAHO <[email protected]> Reviewed-by: Daniel Thwaites <[email protected]>
Closes: #200
Closes: #442
will make
stylix.image
optional, as long asstylix.base16Scheme
is settasks
config.stylix.image
stylix.image
orstylix.base16Scheme
is seti wonder if, in some places,
pixel.nix
would be useful or better than setting nothing at all, though i'm not sure