-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
Allow plasma-apply-wallpaperimage
to fail
#809
Comments
@Alxandr Thanks for reporting! I got two questions:
In any case, the KDE module needs to be updated at least to make the wallpaper optional. Shouldn't be difficult though. |
I have a wallpaper configured, it's not applied (cause I"m not actually running plasma - so that makes total sense). The theme is applied though in multiple applications. Or at least the dark-light-modedness is. For now, I've solved my issue by doing this: https://github.com/Alxandr/nix-system/blob/9445bf3c0f2803794b9d072b85749106daec1f66/config/users/alxandr/home.nix#L211 |
Just to be sure, |
Switching order is probably fine, but is there any good reason to not also just throw a [Edit] |
The wallpaper needs to be optional for #442 and I agree that it's better to not fail activation If you're on UWSM+Hyprland and just run kwallet and maybe kde connect, that counts as outside a Plasma session IMO. |
I agree - but I don't know (cause I've not looked into) what plasma systemd services are also launched that simply got installed because I have plasma installed. |
My reasoning was that if wallpaper setting fails, it exits with a failure, which can then be reacted to accordingly (you can see autostart status in Plasma system settings, for instance). But it also may be reasonable store the exit codes and return them afterward.
I looked at the source code, and it makes sense that wallpaper setting fails, it calls |
If it resolves the issue, then this LGTM. Open a new PR since #772 is merged. |
I will try to remember to test it over the weekend. |
I`m probably doing something wrong, but I don't see switching from danth/stylix to rkuklik/stylix having any effect. It's likely to just be me doing it wrong though as I'm pretty new to flakes (and nix in general). |
So Look and Feel isn't set? The wallpaper should fail (and report doing so), but that should not affect the rest. |
It does not - nor does my workaround actually. Yet calling |
Well, that's wierd. I honestly have no idea what could be done to fix this, given that we already faced these issues (which autostart was the best solution @lordkekz found). My only guess is that maybe autostart scripts aren't ran under Hyprland, but on the other hand I pressume that you rebuild and switch in an already running desktop. @trueNAHO any ideas? I am slowly switching to Hyprland myself, but am nowhere near for me to jump over and try to debug this, so perhaps it might be a good idea to postpone this issue, unless anybody has a solution. Meanwhile @Alxandr maybe try to add the command into |
I'm pretty sure Plasma's autostart scripts don't run under Hyprland (at least not unless you script it yourself). I'll try using the |
Exit code Maybe it can work with a different platform plugin (some are listed in the error log), but I have no clue how to even test that. Maybe it'll just work in any graphical session, even if it isn't Plasma specifically. But I can't test that right now since my Hyprland's been broken for a while (I never fixed it since I'm on KDE anyways). So probably the easy way would be to instruct non-KDE users to add some sort of autostart to call |
From what I can gather, it would work in any graphical session, as you said. I am bit unsure where to add the documentation, in order for it to be discoverable. EDIT: |
I think all my applications are spawned by systemd, not hyprland, so I don't think this should be the case.
I did rebuild & switch, then restarted my login session. Else I wouldn't really be able to tell if anything worked.
I have systemd-autostart running autostart scripts
This is effectively what I've done, though not using |
Yeah, that sounds like systemd-autostart runs it before Hyprland is ready... Maybe you can delay all of systemd-autostart though? Other apps surely could also misbehave if started too early. |
True. The issue is that I got all of this "for free" by simply setting a nix option (something like |
Well, as far as I am aware, that isn't something I can fix on |
Agreed |
I do not have any problems on Hyprland, since my wallpaper is set by hyprpaper: stylix/modules/hyprpaper/hm.nix Lines 9 to 12 in d513f59
Could you provide steps to reproduce this? |
I`m not using hyprpaper - nor is the wallpaper a problem. OS level "dark mode" (and theming) is. My browser is currently stuck in light-mode (not sure why, but lookandfeel just stopped working for me, even though it worked just fine untill my last rebuild). |
Could this problem be solved by |
That used to work for me, but the latest messing around I've done with my config broke that. Now applying look and feel doesn't seem to do anything anymore. I've capitulated for now and manually put brave in dark mode |
I think I got a fix for this. Instead, I use xvfb-run to run the Since I'm on NixOS 24.11, I based my initial attempt on that, see 1427b55. Please use Note that we will still need the activator autostart script to apply the wallpaper (which actually does require plasma, not just a Qt platform). |
I kinda broke my filesystem, and need to get it rescued before I'm able to test anything unfortunately... |
The most popular DEs will do this automatically using the existing autostart desktop entry. This can also be added to other DEs/WMs by running a standalone implementation of XDG autostart, such as |
Or run your WM in UWSM which handles this for you using systemd-autostart. |
I'm migrating from KDE to wayland currently, while keeping a few KDE services like
kwallet
. My current setup means that brave browser (and other software) seem to consult KDE settings whether or not we're currently in dark or light mode, and they get the wrong value. Manually running/run/current-system/sw/bin/plasma-apply-lookandfeel --apply stylix
fixes the problem, but this should be running automatically. However it's not cause the activation script fails at the first step:The text was updated successfully, but these errors were encountered: