Hyprland 0.55 announced the switch to Lua for its config files

133 points - yesterday at 5:31 PM

Source

Comments

rdtsc yesterday at 7:55 PM
It's just part of what I call the config pendulum.

Simple config -> (Need to do more complicated things) -> Add override levels -> (Need even more flexibility) -> Add a Turing complete language -> (Things get ridiculous, lots of spaghetti code outside of version control. Time for a reset) -> goto "Simple config"

It's fine. I am not saying it's wrong or right. I've gone through the cycle a few times in some projects. On the other hand, think of it as your project is lucky to be used long enough to have these problems. To feel better about it think of it as a spiral. The next "Simple config" is a slightly better version of the first.

sph today at 5:34 AM
I want to like Hyprland, but it truly is the embodiment of Jamie Zawinski’s ā€œcascade of attention deficit teenagersā€

This is what happens when software is created by too-smart teenagers, that change core systems as fast as they get better at programming, and expect that everyone is spending 12 hours a day configuring their desktop environment while hanging out in ā€˜ricing’ discords (ā€œwhat do you mean you have a day job?ā€)

Worse, if you dare criticize it, the fanboys come out of the woodwork saying you should really just use an LLM to convert to Lua and that you are dumb trying to do it manually. The hubris is untenable.

After 3 or 4 breaking changes over the years, I decided I’d rather use some other desktop environment honestly, until the core team literally grows up. Niri is great, and its author is much more… mature.

tombert yesterday at 5:57 PM
I have grown pretty negative opinions of ā€œusing a programming language as a config languageā€ after semi-recently having to spend a lot of time screwing around with someone’s Gradle Groovy abomination. Not even to mention how quickly Nix can get annoying.

I have to ask…why do people want a Turing complete language to configure stuff? I use Sway personally, which is very configurable but for any even remotely complicated logic I shell out to a set of Rust programs.

dietr1ch yesterday at 5:45 PM
Old news? 0.56 is out now https://hypr.land/news/update56/
kelvinjps10 yesterday at 5:44 PM
I might be a good change but I left hyprland because,y configuration kept breaking. It's a good window manager so I'll change back once it gets stable. By now i3
nickjj yesterday at 9:39 PM
It's neat that Hyprland lets you define layouts in its config but I like niri's approach.

It uses KDL (an established document / config language) and slightly extends it to add useful things like being able to include files.

For example, here's mine: https://github.com/nickjj/dotfriedrice/blob/master/.config/n...

What you end up with is a config file that's natural to read with no prior knowledge about anything and if you want to look something specific up, you know it's officially documented and not some home grown pattern someone created. There's a certain amount of comfort and stability you get with a "what you see is what you get" approach.

I never felt like I needed variables, conditions, functions or loops with niri's config.

v3ss0n yesterday at 6:20 PM
That's why I love qtile, written in python, modify everything in python, can import any module of it and can install anything, extend existing layout without forking to support very interesting and customized WM layouts, all entirely in python, call any python code in WM.
PessimalDecimal yesterday at 8:30 PM
Lisp is the perfect family of languages for a config. Homoiconic for seamless config generation. S-expressions for shared human and machine readability.
ianm218 yesterday at 6:17 PM
Related to Lua - I've been maintaining this project that has Lua 5.1-5.5 in one Rust project [1]. The main reason to use it over mlua or the normal C Lua is for something that plays nicely with WASM/ general cross compilation or wants to support several different versions of Lua.

Seems like hyprland is on C++ so maybe not a direct use case but thought Lua people in general might be interested.

[1] https://github.com/ianm199/omnilua

Havoc yesterday at 5:44 PM
TIL I'm on 0.56 and hadn't realized there is a change.

Thinking I'll wait as long as I can and then just get an LLM to translate current config to lua once the internet has been seeded a bit with examples

JCattheATM yesterday at 11:18 PM
I wonder how this would make Hyprland compare to Pinnacle or Awesome? So far I haven't found anything better than Awesome for crafting a bespoke desktop experience.
retrochameleon today at 3:56 AM
Uggghhh, I hate Lua. I hate the syntax, everything being tables, and.... dun dun dun 1-indexed arrays.

I wish we wouldn't keep going back to it. I understand the appeal for some use cases, but pleeeeeeease can we just move on to a new language that fulfills the same use cases but with more typical conventions?

IshKebab yesterday at 7:54 PM
I wish there was something better than Lua and just as "obvious" a choice. Static types, real arrays, zero-based indexing, etc.

Closest thing I've seen so far is Roto: https://roto.docs.nlnetlabs.nl/en/stable/index.html

Basically everything about this looks great - Rust-style syntax, static type checking, sane type system, easily embedded. The only slightly odd things are that it has built in types for IP addresses, AS numbers, and `filtermap`. But I guess you can just ignore those if you don't need them.

cbarnes99 yesterday at 5:43 PM
This is kinda really old news at this point. 0.56 just came out.
leephillips yesterday at 7:52 PM
I think dwm has the best approach to configuration: change the program and recompile.

This works for dwm because it compiles in two seconds and has minimal dependencies. I don’t know about hyprland.

https://dwm.suckless.org/customisation/

trollied yesterday at 10:15 PM
Auto play video when you scroll? Behave
JacobAsmuth yesterday at 5:57 PM
Huh? This is from May. You guys should read the more recent notes. https://hypr.land/news/update56/
qiine yesterday at 7:02 PM
lua is love