| automation | Bringing external stuff to be up-to-date with the latest changes | |
| src | Get user's configuration directory directly - xdg base directory spec ( #5 ) | |
| .gitignore | Initial commit | |
| Cargo.toml | Bump version => 0.5.0 | |
| LICENSE.md | Update Licensing | |
| README.md | Updated installation section | |
cosmicvars
A tool which brings COSMIC consistency to configurable programs.
Note
The program should be usable but there aren't any unit tests, yet. I will need to write some unit tests before v1.0 and packaging. Thanks, nerds <3
Pre-requisites
To run this program successfully, you need to be using the COSMIC desktop environment.
Install (WIP)
You can you still with Cargo
cargo install --git https://codeberg.org/spuzkov/cosmicvars.git
I'll package it using openSUSE Build Service once I have read through some documentation.
Why not available Crates.io registery?
Because I am not going to create a fucking Github account. See: https://github.com/rust-lang/crates.io/issues/326.
Usage
You must first create an execution rule.
cosmicvars add -f [YOUR_TARGET_CONFIG_PATH]
NOTE: Check cosmicvars add --help to see more
If everything goes smoothly, you should then run it with
cosmicvars run
IMPORTANT: Nothing will happen yet. You must first go to your target configuration file and add references. This step you only need to do once for new rules. You do this to appply specifc cosmic coloring to the parts of the configuration where you want it to be used.
Here is an example what a Tmux config could look like after first run:
cosmic_background="#0c1b21"
cosmic_accent="#6da741"
# Theming before referencing
set -g status-bg "#FFFFFF"
set -g status-fg "#000000"
# Rest of the config below
# ...
As you can see, the status components are not referring to the new cosmic variables. Let's change that!
set -g status-bg $cosmic_background
set -g status-fg $cosmic_accent
That looks better!
Now everytime you run the command again, it will update the values of the variables and therefore update your configuration.
Automation
I've provided a script which runs your execution rules whenever changes happen in theme directories. You can find the script here.
Contributing
Contributions are welcomed! I'd especially appreaciate contributions to the following:
- source code
- automation examples
- external program specific example (e.g., Tmux, Neovim, Helix, etc.)
- documentation