{"id":51306275,"url":"https://github.com/shvedes/hyprland-config-editor","last_synced_at":"2026-07-01T00:01:19.344Z","repository":{"id":356351333,"uuid":"1232124412","full_name":"shvedes/hyprland-config-editor","owner":"shvedes","description":"A scriptable in-line editor for Hyprland's configuration files (lua-ready)","archived":false,"fork":false,"pushed_at":"2026-05-07T16:40:29.000Z","size":31,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-07T18:36:51.970Z","etag":null,"topics":["config","editor","hyprland","lua"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shvedes.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-07T16:00:11.000Z","updated_at":"2026-05-07T16:42:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/shvedes/hyprland-config-editor","commit_stats":null,"previous_names":["shvedes/hyprland-config-editor"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/shvedes/hyprland-config-editor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shvedes%2Fhyprland-config-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shvedes%2Fhyprland-config-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shvedes%2Fhyprland-config-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shvedes%2Fhyprland-config-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shvedes","download_url":"https://codeload.github.com/shvedes/hyprland-config-editor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shvedes%2Fhyprland-config-editor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34987611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-30T02:00:05.919Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["config","editor","hyprland","lua"],"created_at":"2026-07-01T00:01:18.814Z","updated_at":"2026-07-01T00:01:19.322Z","avatar_url":"https://github.com/shvedes.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Usage Disclosure\n\nI want to be transparent here. The entire project, including the test file, was written by an AI. It originated from my [passion project](https://github.com/shvedes/vibranium), where I needed a simple tool/wrapper to perform one basic task. I didn't want to invest my time in such a trivial thing. Over time, I decided to make it a separate repository in case it would be useful to others as well.\n\nI believe that any AI model was trained using publicly available code, hence the GPL licence. Hope that clarifies things!\n\n# Hyprland Config Editor\n\nA scriptable editor for brace-delimited Hyprland config files.\nReads and writes individual option values without touching the rest of the file.\nDesigned to be called from shell scripts; no runtime dependencies beyond the\nbinary itself.\n\n## Config format\n\nThe tool operates on files using Hyprland's native brace-delimited format:\n\n```\n# comment\ntop_level_option = value\n\nsection {\n    option = value\n\n    subsection {\n        option = value\n    }\n}\n```\n\n## Usage\n\n```\nhce \u003cpath:value\u003e \u003cfile\u003e       Write a value\nhce --get \u003cpath\u003e \u003cfile\u003e       Read a value\nhce -h | --help               Show help\n```\n\n## Path syntax\n\nPath components are separated by `:`.\n\n**Write** — last component is the value, second-to-last is the option name,\neverything before that is the section hierarchy:\n\n```\nsection:option:value\nsection:subsection:option:value\noption:value                        # top-level (no section)\n```\n\n**Read** — last component is the option name, everything before it is the\nsection hierarchy:\n\n```\n--get section:option\n--get section:subsection:option\n--get option                        # top-level\n```\n\n### Occurrence suffix\n\nWhen the same section name appears more than once, append `@N` to the\n**innermost section component** to select which instance to target.\nPositive indices count from the first match; negative indices count from the\nlast.\n\n| Suffix | Meaning             |\n|--------|---------------------|\n| `@1`   | first match (default) |\n| `@2`   | second match        |\n| `@-1`  | last match          |\n| `@-2`  | second-to-last      |\n\nThe suffix is placed on the section name, not on the option or value:\n\n```\ndecoration@-1:rounding\n```\n\n## Behaviour\n\n**Reading** — prints the raw value string to stdout and exits 0. Exits 1\nsilently if the option or section is not found.\n\n**Writing** — updates the option in place if it already exists, or appends it\nto the matching section. If a section in the path does not exist it is created\nat the end of the file (or inside the nearest existing ancestor). Indentation\nstyle (spaces or tabs, and width) is detected from the existing file; tab is\nused as the fallback.\n\nValues wrapped in single or double quotes have the quotes stripped before\nwriting. An explicitly empty-quoted value (`\"\"` or `''`) exits with code 1.\n\nLines beginning with `#` are treated as comments and are never modified or\nmoved.\n\n## Exit codes\n\n| Code | Meaning |\n|------|---------|\n| 0    | success |\n| 1    | not found (read); empty value or bad arguments (write) |\n\n## Examples\n\nSet `border_size` inside `general`:\n\n```sh\nhce general:border_size:2 hyprland.conf\n```\n\nRead it back:\n\n```sh\nhce --get general:border_size hyprland.conf\n# prints: 2\n```\n\nSet a nested option three levels deep (creates sections if missing):\n\n```sh\nhce input:touchpad:natural_scroll:yes hyprland.conf\n```\n\nSet a top-level option:\n\n```sh\nhce monitor:,preferred,auto,1 hyprland.conf\n```\n\nTarget the last `decoration` block:\n\n```sh\nhce decoration@-1:rounding:8 hyprland.conf\n```\n\nRead from the last `decoration` block:\n\n```sh\nhce --get decoration@-1:rounding hyprland.conf\n```\n\nQuote a value that contains shell-special characters:\n\n```sh\nhce general:col.active_border:\"0xff89b4fa\" hyprland.conf\n```\n\nUse the exit code to check whether an option is set:\n\n```sh\nif hce --get general:border_size hyprland.conf \u0026\u003e/dev/null; then\n    echo \"option is present\"\nfi\n```\n\n## Building\n\n```sh\ncargo build --release\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshvedes%2Fhyprland-config-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshvedes%2Fhyprland-config-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshvedes%2Fhyprland-config-editor/lists"}