scheme: Add user-defined schemes with dynamic fallback - #121
Open
XLhinares wants to merge 3 commits into
Open
Conversation
Author
|
I changed the way the schemes are looked up: the cli now use a json file ( Advantages:
Example json: {
"978293.png": "~/.config/caelestia/schemes/black-gold-scheme.txt",
"abstract-black-gold.png": "~/.config/caelestia/schemes/black-gold-scheme.txt",
"abstract-black-purple.png": "~/.config/caelestia/schemes/abstract-black-purple.png.txt"
} |
Author
|
Last commit introduced regex matching.
Example json: {
"978293.png": "~/.config/caelestia/schemes/black-gold-scheme.txt",
"abstract-black-gold.png": "~/.config/caelestia/schemes/black-gold-scheme.txt",
"abstract-black-purple.png": "~/.config/caelestia/schemes/abstract-black-purple.png.txt",
"Wallpapers/dark/": "~/Downloads/dark-scheme.txt",
".*": "~/.config/caelestia/schemes/default.txt"
}Note:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new scheme: manual.
Why
The dynamic scheme works nicely with some wallpapers, and with others I like to use my own scheme. However, if I use a custom scheme, it stays on when I change my wallpaper, which is not ideal either.
Additionally, overwriting the scheme file with a posthook script is not a good option since other scripts watching wallpaper change will use the scheme before it is overwritten.
How
The manual scheme checks if the user has a custom scheme file for the current wallpaper at the path
~/.config/caelestia/schemes/<wallpaper_name>.txt.If that file exists, then it is used as the theme; otherwise, the dynamic scheme is used.
Notes
~/.config/caelestia/schemes/to put their custom schemes.my_wallpaper.png.txt)