explaingit

prateek-squadron/hyprconf2lua

15PythonAudience · developerComplexity · 1/5LicenseSetup · easy

TLDR

A Python tool that converts your existing Hyprland window manager config from the old hyprlang format to the new Lua format required by Hyprland 0.55+.

Mindmap

mindmap
  root((hyprconf2lua))
    What it does
      Converts hyprlang to Lua
      Handles 97% automatically
      Flags TODOs for rest
    Handles
      Keybindings
      Window rules
      Autostart commands
      Monitor configs
    Install options
      pip install
      Clone and run direct
      Check mode for scripts
    Tech
      Python 400 lines
      No compile step
      MIT license
    Audience
      Hyprland users
      Linux power users
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Migrate your existing Hyprland config to Lua automatically so your window manager still works after upgrading to version 0.55 or later.

USE CASE 2

Run hyprconf2lua in check mode inside a git hook to catch any config changes that require manual Lua edits before they break your setup.

USE CASE 3

Convert a friends or community-shared hyprlang config file to Lua without learning the Lua API from scratch.

Tech stack

Python

Getting it running

Difficulty · easy Time to first run · 5min

Requires an existing Hyprland hyprlang config file, install via pip or run directly with Python.

MIT license, use freely for any purpose, including commercial, as long as you keep the copyright notice.

In plain English

Hyprland is a tiling window manager for Linux, and version 0.55 changed how it reads its configuration file. The old format (hyprlang) is being dropped, replaced by Lua, which is a small scripting language. If you have an existing Hyprland setup, your config file will eventually stop working unless you convert it. This tool automates that conversion. You point it at your old hyprland.conf file, it reads through all your settings, keybinds, window rules, monitor configurations, and startup programs, and writes out an equivalent Lua file. The project claims about 97% of a standard config converts cleanly without any manual editing. The remaining few percent, things like plugin-specific settings that require plugin-specific Lua APIs, get marked with a comment saying TODO so you know exactly where to look. Installation is straightforward: you can run pip install hyprconf2lua and then call it from the command line, or you can clone the repository and run it directly with Python without installing anything at all. There is also a check mode for automated setups, where the tool exits with a specific code if anything in your config needs manual attention, which makes it usable in scripts or git hooks. The tool handles a wide range of Hyprland features: key bindings including all the bind variants, window rules with regex matching, autostart commands, environment variables, animations, device sections, gestures, and workspace rules. Nested config sections and variable references are also converted. The author wrote it after Hyprland 0.55 broke the configs of existing users who needed a working migration path. The codebase is around 400 lines of Python and is MIT licensed. A similar converter written in Go exists, but this one requires no compile step and handles more edge cases according to the project's own comparison.

Copy-paste prompts

Prompt 1
I have a Hyprland config at ~/.config/hypr/hyprland.conf. Walk me through using hyprconf2lua to convert it to Lua and explain what the TODO comments in the output mean.
Prompt 2
After running hyprconf2lua, some of my plugin settings are marked TODO. How do I find the correct Lua API calls to replace them?
Prompt 3
How do I use hyprconf2lua's check mode in a git pre-commit hook so my dotfiles repo alerts me when a config change needs manual attention?
Open on GitHub → Explain another repo

← prateek-squadron on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.