{"id":21760267,"url":"https://github.com/hyprutils/hyprparser","last_synced_at":"2025-07-25T21:04:43.219Z","repository":{"id":259948128,"uuid":"871422746","full_name":"hyprutils/hyprparser","owner":"hyprutils","description":"A parser for hyprland written in rust 🚀🦀","archived":false,"fork":false,"pushed_at":"2024-11-24T04:21:48.000Z","size":91,"stargazers_count":17,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-24T04:37:56.309Z","etag":null,"topics":["hyprland","hyprutils","parser","rust","wayland"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyprutils.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-11T23:59:40.000Z","updated_at":"2024-11-24T04:21:17.000Z","dependencies_parsed_at":"2024-10-29T21:09:05.989Z","dependency_job_id":null,"html_url":"https://github.com/hyprutils/hyprparser","commit_stats":null,"previous_names":["hyprutils/hyprparser","nnyyxxxx/hyprparser"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyprutils%2Fhyprparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyprutils%2Fhyprparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyprutils%2Fhyprparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyprutils%2Fhyprparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyprutils","download_url":"https://codeload.github.com/hyprutils/hyprparser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226535273,"owners_count":17647583,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hyprland","hyprutils","parser","rust","wayland"],"created_at":"2024-11-26T11:38:49.867Z","updated_at":"2024-11-26T11:38:50.917Z","avatar_url":"https://github.com/hyprutils.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align='center'\u003e\n\n\u003ch2\u003eHyprParser \u003cimg src='https://raw.githubusercontent.com/hyprutils/.github/refs/heads/main/hyprutils_transparent.png'width='18' height='18'\u003e\u003c/h2\u003e\n\nA parser for Hyprland's configuration files written in Rust 🚀🦀\n\n\u003cimg src='hyprparser.png' width='200' height='200'\u003e\u003cbr\u003e\n\n[![Crates.io Version](https://img.shields.io/crates/v/hyprparser)](https://crates.io/crates/hyprparser)\n\n[Hyprland Configuration Documentation](https://wiki.hyprland.org/Configuring/Configuring-Hyprland)\n\n\u003c/div\u003e\n\n## Usage\nHyprParser is available on [Crates.io](https://crates.io/crates/hyprparser). It can be added as a dependency with:\n\n```bash\n$ cargo add hyprparser\n```\n\nHere's an example usage:\n\n```toml\n# Cargo.toml\n\n[dependencies]\nhyprparser = \"0.1.2\"\n```\n\n```rust\n// main.rs\n\nuse hyprparser::parse_config;\nuse std::{env, fs, path::Path};\n\nfn main() {\n    let config_path = Path::new(\u0026env::var(\"XDG_CONFIG_HOME\").unwrap_or_else(|_| {\n        let home = env::var(\"HOME\").unwrap_or_else(|_| \".\".to_string());\n        format!(\"{}/.config\", home)\n    }))\n    .join(\"hypr/hyprland.conf\");\n\n    let config_str = fs::read_to_string(\u0026config_path).unwrap();\n\n    let mut parsed_config = parse_config(\u0026config_str);\n\n    parsed_config.add_entry(\"decoration\", \"rounding = 10\");\n    parsed_config.add_entry(\"decoration.blur\", \"enabled = true\");\n    parsed_config.add_entry(\"decoration.blur\", \"size = 10\");\n    parsed_config.add_entry_headless(\"$terminal\", \"kitty\");\n\n    let updated_config_str = parsed_config.to_string();\n\n    fs::write(\u0026config_path, updated_config_str).unwrap();\n\n    println!(\"Updated hyprland.conf with new configuration.\");\n}\n```\n\n## TODO\n- [ ] Color formatting tests\n\n## Credits\n- [Nyx](https://github.com/nnyyxxxx) - The parser (everything), [HyprGUI](https://github.com/hyprutils/hyprgui)\n- [Adam](https://github.com/adamperkowski) - Code optimization, unit tests, documentation updates, [HyprGUI](https://github.com/hyprutils/hyprgui)\n- [Vaxry](https://github.com/vaxerski) - Hyprland\n- [Hyprland](https://github.com/hyprwm/Hyprland) - The wayland compositor\n\n\u003ch6 align='center'\u003eCopyright (C) 2024 HyprUtils\u003ch6\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyprutils%2Fhyprparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyprutils%2Fhyprparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyprutils%2Fhyprparser/lists"}