feat(wrapperModules.quickshell): add 'configDir' option#552
Conversation
7539683 to
1855827
Compare
|
Hey, thanks for the feedback, I should've thought of that when I made the quickshell module. I'm just kind of a newbie when it comes to quickshell. Allowing to link an existing quickshell config directory and allowing modules is a nice and easy addition. To add to this, I think it is also a good idea to add a declarative option to fix this issue. I'm thinking of adding the option Something like: components.bar = ''
<some quickshell component>
'';
components.foo = {
data = ''
<some quickshell component>
'';
module = "time/notifications";
};I'll open an extra PR for that |
|
This was definitely quite the oversight on my part to not check how the imports worked properly. I think I might like the other general approach a bit better still tho? "use the structured options or ignore all those and use the dir" doesn't feel like the best we can do with this. But at the same time, there are also people who have existing quickshell configs so that is also worth thinking about. So it might still be worth giving some way to do this still which is better than overriding --path yourself? Unsure still. Thank you for making us aware of the issue though, it is appreciated. |
|
The reason I went with this approach of linking the whole directory is that if I have like 50 qml files, I have to manually tell the wrapper where to put each file. Just to rebuild a structure that already exists in the real directory. |
|
I understand that. In the meantime you will have to set Doing this will disable all the other options in the module, as your implementation does. But using the configDir model, this module is painfully simple. { config, lib, wlib, pkgs, ... }: {
imports = [ wlib.modules.default ];
package = pkgs.quickshell;
flags."--path" = ./mypath;
}It barely requires a module at all at that point. We may still add this option, but consider doing it like that for the meantime. As far as this PR implementation goes, rather than making all the logic conditional, you should just be making your configDir option contain by default the generated path, and then treating config.configDir option as the source of truth you pass to In fact, we will likely still do that with the other PR in addition to the changes there, for the reasons we both have stated. |
1855827 to
2011119
Compare
2011119 to
fb1a312
Compare
|
Thanks for your suggestion, this makes the implementation a lot simpler |
Problem:
The current implementation only allows to link single component files next to the shell.qml file. This makes it impossible to use nested quickshell components and import them via
import qs.xxx.xxxFirst solution:
remove the auto capitalization of the component names to allow for passing a directory of components or a nested path of components. However because all the files were generated into different /nix/store paths as the shell.qml file using root imports was impossible because these files were not in the same directory.
Solution:
Add
configDiroption alongsideconfigFile, which if set symlinks the whole directory to thequickshell-configpath