1
0
Fork
You've already forked cosmicvars
0
Program which provides your active COSMIC DE theme to any configurable program
Rust 94.7%
Shell 5.3%
2026年01月05日 20:45:30 +01:00
automation Bringing external stuff to be up-to-date with the latest changes 2026年01月04日 21:08:43 +02:00
src Get user's configuration directory directly - xdg base directory spec ( #5 ) 2026年01月05日 20:45:30 +01:00
.gitignore Initial commit 2025年12月22日 01:30:46 +01:00
Cargo.toml Bump version => 0.5.0 2026年01月04日 20:14:39 +01:00
LICENSE.md Update Licensing 2025年12月22日 04:16:29 +02:00
README.md Updated installation section 2026年01月05日 01:58:58 +01:00

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