r/archlinux • • 3d ago

SUPPORT I need to fix terminal error

I am getting an error message saying "/home/$USER/hypr/hyprland.lua:2 attempt to concatenate a nil value (global 'mainMod') stack straceback: /home/$USER/.config/hypr/hyprland.lua:2: in main chunk, my mainMod is set to SUPER and the second line is set up as hl.bind(mainMod .. " + R", hl.rsp.exec_cmd(menu))

0 Upvotes

13 comments sorted by

11

u/thekiltedpiper 3d ago

Try r/hyprland, you'll get more specific help.

1

u/Scary-Yesterday-5112 3d ago

I did

thanks for the advice

4

u/mips13 3d ago

The most likely cause is that SUPER isn't in quotes.

local mainMod = "SUPER"

It would actually help people if you posted the contents of the file.

1

u/Scary-Yesterday-5112 3d ago

local mainMod is set like that

3

u/lritzdorf 3d ago

You've, uh, gotta define a value for your main modifier key in Hyprland. You apparently haven't, which is why mainMod is nil. Since the error is coming from line 2, make sure your mainMod definition happens before that

3

u/Chester-Berkeley 3d ago

This is a problem with your Hyprland configuration; your Arch is fine.

2

u/Kurse71 3d ago

I think this is a lua syntax error. You are probably missing a quote, comma, or something like that on line 2

0

u/TheShredder9 3d ago

You would think it's on line 2, but when i was using nixOS, an error being reported on line 2 could mean nothing and the actual error is 60 lines down.

1

u/Kurse71 3d ago

Yes, sometimes its weird like that, but hopefully you figured it out.

2

u/planim 2d ago

I am not sure if
hl.rsp
is valid, maybe try
hl.dsp

1

u/archover 3d ago edited 2d ago

r/hyprland is dedicated, so you'll find more hyprland help there. Hope you resolve and good day.