Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-blue.svg">
<img alt="Python 3.10+" src="https://img.shields.io/badge/python-3.10%2B-blue.svg">
<img alt="Hyprland 0.55+" src="https://img.shields.io/badge/hyprland-0.55%2B-1a9fb2.svg">
<img alt="tests" src="https://img.shields.io/badge/tests-170%20passing-brightgreen.svg">
<img alt="tests" src="https://img.shields.io/badge/tests-219%20passing-brightgreen.svg">
</p>

---
Expand Down
2 changes: 1 addition & 1 deletion packaging/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pkgname=hyprvalidate
pkgver=0.4.0
pkgrel=1
pkgdesc="Convert and validate Hyprland Lua configs against Hyprland's real API schema"
pkgdesc="Validate, auto-fix, and migrate Hyprland Lua configs against Hyprland's real API schema"
arch=('any')
url="https://github.com/Paritsingla7/hyprvalidate"
license=('MIT')
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "hyprvalidate"
version = "0.4.0"
description = "Convert and validate Hyprland Lua configs against Hyprland's real API schema"
description = "Validate, auto-fix, and migrate Hyprland Lua configs against Hyprland's real API schema"
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
Expand Down
97 changes: 64 additions & 33 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,65 +3,58 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>hyprvalidate — Hyprland config converter &amp; validator</title>
<meta name="description" content="Convert hyprland.conf to Lua and validate Hyprland Lua configs against Hyprland's real API schema. Free, open source, runs in your browser." />
<title>hyprvalidate — validate, fix, and migrate Hyprland Lua configs</title>
<meta name="description" content="Validate and auto-fix Hyprland Lua configs against Hyprland's real API schema, migrate an old hyprland.conf into modular Lua files, and catch what a future Hyprland update would break before it does. Free, open source, runs in your browser." />
<link rel="canonical" href="https://paritsingla7.github.io/hyprvalidate/" />
<meta name="author" content="Paritsingla7" />
<meta name="robots" content="index, follow" />

<meta property="og:type" content="website" />
<meta property="og:site_name" content="hyprvalidate" />
<meta property="og:url" content="https://paritsingla7.github.io/hyprvalidate/" />
<meta property="og:title" content="hyprvalidate — convert hyprland.conf to Lua, and validate it" />
<meta property="og:description" content="Migrating to Hyprland 0.55's Lua config? Convert your old hyprland.conf into modular Lua files and validate the result against Hyprland's real API schema. Try it in your browser." />
<meta property="og:title" content="hyprvalidate — keep your Hyprland Lua config working" />
<meta property="og:description" content="Validate and auto-fix a Hyprland Lua config against Hyprland's real API schema, migrate an old hyprland.conf into modular Lua files, and check what a future Hyprland update would break. Try it in your browser." />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="hyprvalidate — convert hyprland.conf to Lua, and validate it" />
<meta name="twitter:description" content="Convert your old hyprland.conf into modular Lua files and validate the result against Hyprland's real API schema. Runs in your browser." />
<meta name="twitter:title" content="hyprvalidate — keep your Hyprland Lua config working" />
<meta name="twitter:description" content="Validate, auto-fix, and migrate Hyprland Lua configs against Hyprland's real API schema. Runs in your browser." />

<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "hyprvalidate",
"description": "Converts an old hyprland.conf (hyprlang) config into Hyprland's Lua config format, and validates any Hyprland Lua config against Hyprland's own autogenerated API schema.",
"description": "Validates and auto-fixes a Hyprland Lua config against Hyprland's own autogenerated API schema, migrates an old hyprland.conf (hyprlang) config into Lua, and checks whether a config will still work after a Hyprland update.",
"applicationCategory": "DeveloperApplication",
"operatingSystem": "Linux",
"url": "https://paritsingla7.github.io/hyprvalidate/",
"downloadUrl": "https://github.com/Paritsingla7/hyprvalidate",
"codeRepository": "https://github.com/Paritsingla7/hyprvalidate",
"programmingLanguage": "Python",
"softwareVersion": "0.1.0",
"softwareVersion": "0.4.0",
"license": "https://opensource.org/licenses/MIT",
"author": { "@type": "Person", "name": "Paritsingla7" },
"offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" }
}
</script>
<style>
:root {
--bg: #eef2f5;
--surface: #e2e8ed;
--surface-2: #d7dfe5;
--ink: #0b1622;
--ink-soft: #3d4f5f;
--line: #c3cfd7;
--line-strong: #9fb0bb;
--accent: #0e8fa3;
--accent-ink: #06414a;
--warn: #b5602a;
--warn-ink: #7a3f18;
--danger: #b5402a;
/* Dark is this site's actual theme, not a system-preference fallback -
these are the base tokens now, not gated behind a media query. */
--bg: #0b1622;
--surface: #101f30;
--surface-2: #16283c;
--ink: #dce8f2;
--ink-soft: #8fa6bd;
--line: #223449;
--line-strong: #33506b;
--accent: #5ec8d8;
--accent-ink: #bdeef5;
--warn: #e0834f;
--warn-ink: #f4c6a4;
--danger: #e0834f;
--mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
--sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #0b1622; --surface: #101f30; --surface-2: #16283c;
--ink: #dce8f2; --ink-soft: #8fa6bd;
--line: #223449; --line-strong: #33506b;
--accent: #5ec8d8; --accent-ink: #bdeef5;
--warn: #e0834f; --warn-ink: #f4c6a4; --danger: #e0834f;
}
}
:root[data-theme="dark"] {
--bg: #0b1622; --surface: #101f30; --surface-2: #16283c;
--ink: #dce8f2; --ink-soft: #8fa6bd;
Expand Down Expand Up @@ -247,8 +240,8 @@
<section class="hero">
<div>
<p class="eyebrow">§0 — schema-driven, not guessed</p>
<h1 class="headline">Convert <span class="dim">hyprland.conf</span> to Lua. Get back working config.</h1>
<p class="lede">Hyprland 0.55 replaced <code>hyprland.conf</code> with a Lua config. hyprvalidate migrates your old hyprlang config into a modular set of Lua files — organized the way Hyprland's own docs recommend, not dumped into one file — by looking up every dispatcher and value type in Hyprland's real API schema instead of a hand-typed table. Then it validates the result, and any Hyprland Lua config you already have, the same way.</p>
<h1 class="headline">Keep your <span class="dim">Hyprland Lua</span> config working.</h1>
<p class="lede">Hyprland 0.55 replaced <code>hyprland.conf</code> with a Lua config, and the API underneath it is still evolving. hyprvalidate checks any Hyprland Lua config against Hyprland's real, autogenerated API schema — never a hand-typed table that drifts — and auto-fixes what has exactly one right answer. Migrating an old <code>hyprland.conf</code>? It converts that into modular Lua files first, the way Hyprland's own docs recommend, then validates the result the same way.</p>
<div class="cta-row">
<a class="btn primary" href="#demo">Try it on your config →</a>
<a class="btn" href="#install">Install</a>
Expand Down Expand Up @@ -331,7 +324,7 @@ <h2 class="section-title"><span class="tag">§3</span> The validator</h2>

<div class="annot">
<div class="src">HL.BindOptions, the installed stub</div>
<div class="note">The Lua wiki's own examples use <code>{ mouse = true }</code> — that field doesn't exist in the real schema. The real replacement is <code>drag</code>.</div>
<div class="note">Real-world configs (Garuda Linux's distribution settings, the sea-shell project) use <code>{ mouse = true }</code> — a real, implemented flag in Hyprland's own source, just missing from the schema Hyprland itself generates. hyprvalidate can't invent a field the stub doesn't have — flagged here as a known gap, not silently ignored.</div>
</div>

<div class="cards">
Expand All @@ -351,8 +344,46 @@ <h3>Runs on directories too</h3>

<hr class="ruled" />

<section id="fix">
<h2 class="section-title"><span class="tag">§4</span> The fixer</h2>
<p class="section-dek">For the findings with exactly one correct answer, <code>check</code> can just make the correction — never a guess, only what's mechanically unambiguous.</p>
<div class="cards">
<div class="card">
<div class="cmd">$ hyprvalidate check config.lua --fix</div>
<h3>Two corrections, both provably safe</h3>
<p>A bare identifier where a string was meant (<code>accel_profile = flat</code> → <code>"flat"</code> — the exact bug that changed a real user's mouse sensitivity after a migration), and a dispatcher factory referenced but never called. Patches the source directly, re-checks, and won't write a fix that turns out to break something else.</p>
<div class="codebit">[possible_missing_quotes] 'input.accel_profile' is set to the bare<br>&nbsp;&nbsp;identifier 'flat' — did you mean the string "flat"?</div>
</div>
<div class="card">
<h3>Everything else stays reported, not guessed</h3>
<p>An unknown dispatcher or config key (which real name was meant?), a type or arity mismatch, two binds fighting over the same key combo — no single correct fix exists, so <code>--fix</code> leaves them exactly as <code>check</code> reports them.</p>
</div>
</div>
</section>

<hr class="ruled" />

<section id="diff-impact">
<h2 class="section-title"><span class="tag">§5</span> Stay working through the next update</h2>
<p class="section-dek">Hyprland's Lua API is still young — a real config field was renamed one day after Lua config first shipped. <code>diff-impact</code> checks a config against what's changed between two schema versions, so you find out before you update, not after.</p>
<div class="cards">
<div class="card">
<div class="cmd">$ hyprvalidate diff-impact config.lua --from old.json --to new.json</div>
<h3>Only what your config actually uses</h3>
<p>Cross-references the schema diff against your config's real usage, not Hyprland's whole API surface — most changes between two versions won't touch anything you wrote.</p>
<div class="codebit">[possible_rename] 'allow' on HL.PermissionSpec no longer exists<br>&nbsp;&nbsp;↳ possibly renamed to 'mode' (heuristic guess, not confirmed)</div>
</div>
<div class="card">
<h3>Warns by default, never claims certainty</h3>
<p>Exits <code>0</code> even when it finds something — a schema diff is evidence of a possible behavior change, not proof of one. <code>--fail-on-impact</code> opts a CI job into treating it as a failure instead.</p>
</div>
</div>
</section>

<hr class="ruled" />

<section id="install">
<h2 class="section-title"><span class="tag">§4</span> Install</h2>
<h2 class="section-title"><span class="tag">§6</span> Install</h2>
<p class="section-dek">Requires Hyprland v0.55+ (the Lua config API) and Python 3.10+.</p>

<div class="install-tabs" role="tablist" aria-label="Install method">
Expand Down
Loading