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

External style configuration file #100

Closed
AlecsFerra opened this issue Oct 29, 2020 · 3 comments
Closed

External style configuration file #100

AlecsFerra opened this issue Oct 29, 2020 · 3 comments

Comments

@AlecsFerra
Copy link

It would be cool to have an option to load an external file for configuring the colors so the application can be themed automatically by software like pywal.

@Mesabloo
Copy link

After taking a look into the library I think is used⁽¹⁾, there doesn't seem to be a way of handling file inclusions in configuration files using the library.
We could instead have a key "include" or "import" in the configuration, and handle all the inclusion logic directly in this program⁽²⁾, but this is a little bit more work. (especially considering all the difficulties that could arise)

I unfortunately cannot work on this because I'm on NixOS and there is a known bug I ran into that prevents me from compiling the haskell-gi package, which is needed by this program.


⁽¹⁾:


⁽²⁾: so for example, we could have a configuration file deadd.conf containing

[colors]
include = "~/.config/deadd/colors.conf"
# other configuration options

and the file colors.conf with all your colors.
The only problem that seems to arise (as little as I thought about it) is that the include key should be somehow replaced in-place (so the included file should take take the place of the include option to preserve option ordering, which is vital in an INI-style configuration style with sections). I believe this could mess with a little bit of the current code, unless we provide a way to concatenate two configurations in Config.hs, but then we would not preserve key ordering, unless we only allow includeing in the DEFAULT section (which restricts greatly its use with pieces of software like pywal because it doesn't insert a [colors] section header at the top of the file).

@phuhl
Copy link
Owner

phuhl commented Oct 31, 2020

This could be a part of a potential restructuring of the config as tracked by #80

@phuhl
Copy link
Owner

phuhl commented Dec 19, 2020

I currently don't think, there will be a way to import colors or anything, but you could easily write a script, that patches the new deadd.css file (more infos on that here: https://github.com/phuhl/linux_notification_center#css-styling) and than reload the styling information on the fly (more infos on that here: https://github.com/phuhl/linux_notification_center#usage). I guess, that would allow for styling with pywal.

I will close this for now, if I am wrong, and there are further changes needed, feel free to reopen

@phuhl phuhl closed this as completed Dec 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants