-
Notifications
You must be signed in to change notification settings - Fork 470
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 for reading theme information from standalone files (cf PR #366) #611
Conversation
This paves the way for modifying what keys are permitted in the TOML entry for [theme]. (cherry picked from commit 109710d)
This introduces a new `theme.file` key to the TOML configuration. We look in the following locations for this file: - The actual file location, if it is a real path. - $XDG_CONFIG_HOME/i3status-rs/themes; and - /usr/share/i3status-rs/themes The theme file must be "complete", e.g. contain all of the keys, for it to be serialized correctly. (cherry picked from commit f36e2e3)
run cargo fmt (cherry picked from commit d1dad49)
This looks good to me in general, thanks for taking up the cause. Two concerns:
|
Config path fixed in latest commit.
I wouldn't say it is necessary: It might be possible to adapt the tests so that no temporary files are required (we wouldn't depend on I would argue it's only dev-dependencies: If this new dependency is an issue don't hesitate to reach me out :) |
update themes.md
I think it's fine if it's just a dev dep. Also it could lead the way for tests to be introduced in the other blocks too. @atheriel ? |
Allow for reading theme information from standalone files (cf PR #366)
This PR contains the original 2 commits from atheriel (rebased).
Thanks to @atheriel who did the heavy-lifting =)
It should be compatible with previous config file format: see unit tests in
src/config.rs
.I took the opportunity to move
has_command
frompacman.rs
toutils.rs
.I also added some unit tests for
color_from_rgba
, I changed the code a little to fix a panic when input is too short:color_from_rgba("rust")
would panic...