You can read more about me and my projects below
You can read more about the projects below
matugen -h
Not to be confused with --import-json flag, this one outputs the generated JSON.
matugen <other-arguments> --json <FORMAT>
Example:
matugen color hex "#ffbf9b" --json rgb
You can also automatically import JSON files from the config. See the [config.import_json_files]
option.
The order is from first to last imported, the later ones will overwrite data
--import-json--import-json-string[config.import_json_files]Not to be confused with --import-json flag, this one outputs the generated json.
matugen <other-arguments> -m light
Example:
matugen color hex "#ffbf9b" --json rgb
Not to be confused with --import-json flag, this one outputs the generated json.
matugen <other-arguments> -m light
Example:
matugen color hex "#ffbf9b" --json rgb
If no mode is provided, the default is dark.
matugen <other-arguments> -m light
matugen <other-arguments> -m dark
Use matugen -h to see all the available formats you can use.
# Dark mode
matugen color hsl <hsl color> -m "dark"
# Light mode
matugen color hex <hex color> -m "light"
matugen image /path/to/wallpaper/
You can use a custom configuration path by using the -c argument
| Platform | Location |
|---|---|
| Windows | C:\Users\user\AppData\Roaming\InioX\matugen\config\config.toml |
| Linux/Unix | /home/user/.config/matugen/config.toml |
| MacOS | /Users/user/Library/Application Support/com.InioX.matugen/config.toml |
The example config.toml file has comments for every option in the config.
# config_directory/config.toml
[templates.test] # First way of adding template
input_path = '~/.config/example/template.css'
output_path = '~/.config/example'
[templates] # Another way
test2 = { input_path = '~/.config/example/template2.css', output_path = '~/.config/example2' }
pre_hook: Executes a command inside the string BEFORE the template is
generatedpost_hook: Executes a command inside the string AFTER the template is
generated[templates.test]
# input_path = "some/path"
# output_path = "some/path"
pre_hook = 'echo "hello world"'
post_hook = "cat /some/file.txt"
For more information about features click the button below.
Matugen gets compiled with these features by default:
| Name | Default | Description |
|---|---|---|
dump-json |
✅ | The ability to use the --dump-json flag. |
web-image |
❌ | The ability to use the matugen web-image subcommand. |
update-informer |
❌ | Will notify the user if there is an update available |
cargo build --features "<features seperated by space>"
cargo build --all-features
cargo install matugen
Replace yay with your favorite AUR helper
yay -S matugen-bin
pkgin install matugen
Or if you prefer building from source:
cd /usr/pkgsrc/graphics/matugen
make install
Add matugen to your flake inputs
inputs = {
matugen = {
url = "github:/InioX/Matugen";
# If you need a specific version:
ref = "refs/tags/matugen-v0.10.0";
};
# ...
};
Then you can add it to your packages
let
system = "x86_64-linux";
in {
environment.systemPackages = with pkgs; [
# ...
inputs.matugen.packages.${system}.default
];
}
This flake also provides a NixOS/Home Manager module, which can be imported by adding this in your configuration
{pkgs, inputs, ...}: {
imports = [
inputs.matugen.nixosModules.default
];
# ...
}
The module does NOT automatically symlink the files. For an example of using this module with Home Manager,
see
this issue comment
.
Option details can be found by reading the module.
| Type | Syntax | Description |
|---|---|---|
| Expression (Keyword) | {{ expression }} |
Evaluates and outputs a value. |
| Block | <* ... *> |
Used for loops, conditionals and includes. |
| Escaping | \{{ ... }} |
Escapes template output so it isn’t evaluated. |
Use dot notation to access nested values inside context objects.
{{ colors.primary.default.hex }}
{{ palettes.error._99.hex }}
{{ mode }}
Example:
{{ custom.red_color.hex }} -> #ff0000
{{ custom.red_color.rgb }} -> rgb(255, 0, 0)
Includes another template file, the name should be the template name you put in the config.
If you just want to use the included template inside of another one and don't want to write
it to a file,
you can just comment out the output_path
[templates.includeme]
input_path = "./include.txt"
# The output path is optional if you just want to import the template
# output_path = "./a/include.txt"
Example:
<* include "includeme" *>
Conditionals allow branching logic inside templates.
<* if {{ condition }} *>
...content if true...
<* else *>
...content if false...
<* endif *>
Example:
<* if {{ is_dark_mode }} *>
Dark Mode
<* else *>
Light Mode
<* endif *>
Iterates over a numeric range (inclusive).
<* for i in -10..10 *>
{{ i }}
<* endfor *>
Iterates through maps or objects, exposing both key and value bindings.
<* for name, value in colors *>
{{ name }}: {{ value.default.hex }};
<* endfor *>
Filters transform or modify values, they are chained using the pipe symbol
(|).
They can support Expressions as arguments.
Example:
{{ colors.primary.default.hex | lighten: 20.0 | invert }}
<* for i in -10..10 *>
actual: {{ i }} multiplied: {{ {{ i }} * 10 }} {{ colors.red.default.hex | lighten: {{i}} * 10 }}
<* endfor *>
Expressions can be nested or contain arithmetic operations.
{{ {{ i }} * 10 }}
{{ colors.red.default.hex | lighten: {{ i }} * 10 }}
To render raw {{ ... }} text without evaluating it:
\{{ colors.primary.default.hex }}
This will output literally {{ colors.primary.default.hex }} in
the result.
TODO
Hi, my name is ini.
I am an electrical engineering student from Czechia.
I like Linux, programming, and tech in general. I also REALLY like Material Design 3.
A Material You color generation tool built in Rust with its own templating engine, support for filters, importing data. There is also a theme repository mentioned in the README that has a lot of apps supported in it.
My personal dotfiles for NixOS, Arch, Windows, and Android. Arch and Windows branches are not really maintained and just there as an archive. The android version has its own script for automatically importing a backup into obtainium and installing all apps with it. It uses adb commands to simulate touch. Might work but i switched to just doing it manually.
The current website you are looking at right now. It is in pure HTML, CSS and js.
For the Material You theming it uses Material
Design 3
for
Web.