Crates.io | hypryaml |
lib.rs | hypryaml |
version | 0.2.0 |
created_at | 2025-09-21 06:16:33.370291+00 |
updated_at | 2025-09-21 06:16:33.370291+00 |
description | Dynamically set Hypr values using YAML ! |
homepage | https://github.com/mccreemainwoody/hypryaml |
repository | https://github.com/mccreemainwoody/hypryaml |
max_upload_size | |
id | 1848488 |
size | 42,536 |
hypryaml is a simple CLI tool to parse and load dynamic configurations for the Hypr tools family using YAML files. It is made in Rust, but also possesses a Python implementation, which can also be used as a package to use within other Python applications.
This is a very, very simple package which is still in development. It will (probably) receive much improvements in the future. But for now, it is usable if you want to use it in higher-level projects for pretty cool stuff. :)
This package may be used for, for example :
You can download hypryaml using Cargo :
cargo install hypryaml
Cargo will install the package from the crates.io repository. Don't forget to add its folder to your PATH if it isn't already so:
export PATH="~/.cargo/bin:$PATH"
You're then ready to use the package !
Build and install the package on your local machine using Cargo :
cargo install --git ssh://git@github.com/mccreemainwoody/hypryaml.git
If Cargo cannot fetch the repository on its own, you can also download the package by yourself and let cargo install it afterwards :
git clone git@github.com/mccreemainwoody/hypryaml.git
cargo install --path hypryaml
Then, don't forget to add Cargo to your PATH to make sure you can access the compiled binary !
export PATH="~/.cargo/bin:$PATH"
First, create a configuration file. Using your favorite editor, open a new file and create a YAML node following the structure :
# my_config.yaml
hyprland:
general:
border_size: 1
col.inactive_border: rgb(ff0000) rgb(ffff00) 45rad
col.active_border: rgb(33ccff) rgb(00ff99) 45rad
(In the case of Hyprland, each leaf node will be parsed as a configuration
keyword to apply. For example, the node on line 3 (if correctly placed
anywhere wihtin the hyprland
node) will be understood as "the keyword
general:col.inactive_border
must be set to the value rgb(ff0000) rgb(ffff00) 45rad
". All the available Hyprland keywords can be changed
through this structure.)
Then, call the CLI with the file as a parameter :
hypryaml apply my_config.yaml
And voilà! Your configuration is automatically loaded into your current Hyprland environment instance.
If you wish to apply a hyprpaper wallpaper using a YAML configuration, you can do so by specifying a list of wallpapers to apply (you may add it next to your Hyprland configuration !) :
# my_config.yaml
hyprpaper:
- monitor: DPD-1
wallpaper: ~/wallpapers/amogus.png
- monitor: DPD-2
wallpaper: ~/wallpapers/amogus.png
- monitor: *
wallpaper: ~/wallpapers/amogus.png
If you use values normally extended by your terminal (~ token, environments variables...), hypryaml will extend them for you before passing it to hyprctl !
You can also use the special value *
to specify a wallpaper to apply to all
monitors. If you use this feature, it is recommanded you do not use a
default hyprpaper.conf configuration file. (setting a wallpaper for a
monitor will not affected any global wallpaper settings)
As the project is still in an early state: only Hyprland keywords and hyprpaper wallpapers are supported as of now (which is still sufficient to start creating themes!). Planned or potential improvement may include :
If you wish to contribute to the project, do not hesitate to open a pull request or even a feature or bug issue ! Specific improvements may take time to arrive unless requested, and the project is still in a very early state. As such, anyone can bring their own piece to this project concept if they want to !