Problem with lua migration

Hey guys, I just updated hyprland and… a tiny thing does not work as intended anymore. I found a workaround, and discovered that now the configurations should be written in lua.

ok, I wrote an equivalent to my config, but when when I try it, it’s the default config that’s being used, meaning there’s something wrong with my dotfiles, somewhere.

Is anyone spoting what’s wrong ? (I commented out what I thought could be problematic, but no changes, still defaulting)
Or is there a log of the lua interpreter output somewhere ?

hyprland.lua
hl.monitor({
	output = "DP-1",
	mode = "[email protected]",
	position = "0x0",
	scale = 1,
})

hl.monitor({
	output = "DP-3",
	mode = "[email protected]",
	position = "-1920x0",
	scale = 1,
})

-------------------------
------ MY PROGRAMS ------
-------------------------

local terminal = "kitty"
local fileManager = "nautilus"
local menu = "wofi --show drun"

-----------------------
------ AUTOSTART ------
-----------------------

hl.on("hyprland.start", function()
	hl.exec_cmd("hyprpm reload -n")
	hl.exec_cmd("gammastep")
	hl.exec_cmd("hyprpaper")
	hl.exec_cmd("dunst")
end)

-----------------------------------
------ ENVIRONMENT-VARIABLES ------
-----------------------------------

hl.env("XCURSOR_SIZE", "24")
hl.env("HYPRCURSOR_SIZE", "24")

-------------------------
------ PERMISSIONS ------
-------------------------

---------------------------
------ LOOK AND FEEL ------
---------------------------

hl.config({
	general = {
		gaps_in = 1,
		gaps_out = 0,
		border_sizer = 1,
		col = {
			active_border = {
				colors = { "rgba(33ccffee)", "rgba(00ff99ee)" },
				angle = 45,
			},
			inactive_border = "rgba(595959aa)",
		},
		resize_on_border = false,
		allow_tearing = false,
		layout = "scrolling",
	},

	decoration = {
		active_opacity = 1.0,
		inactive_opacity = 1.0,
		dim_inactive = false,
		dim_strengh = 0.15,
	},

	animations = {
		enabled = false,
	},

})

hl.config({
	scrolling = {
		focuse_fit_method = 0,
		fullscreen_on_one_column = true,
		column_width = 1.0,
	},
	dwindle = {
		preserve_split = true,
	},
	master = {
		new_status = "master",
	},
})

------------------
------ MISC ------
------------------

hl.config({
	misc = {
		force_default_wallpaper = 0,
		disable_hyprland_logo = true,
		vfr = false,
	},
	cursor = {
		inactive_timeout = 2,
	},
})

-------------------
-----  INPUT  -----
-------------------

hl.config({
	input = {
		kb_layout = "custom",
		kb_variant = "coding",
		kb_model = "",
		kb_options = "",
		kb_rules = "",

		follow_mouse = 0,

		sensitivity = 0,

		touchpad = {
			natural_scroll = false,
		},

		tablet = {
			transform = 0,
			ouput = "current",
			region_position = { 1, 0 },
			region_size = { 1918, 1080 },
			left_handed = true,
			active_area_size = { 240, 150 },
			active_area_position = { 20, 25 },
		},
	},
})
---
--------------------------------------------
-----  WORKSPACE & RELATED KEYBINDING  -----
--------------------------------------------
--require("workspaces")

-------------------------
-----  KEYBINDINGS  -----
-------------------------

local mainmod = "SUPER"

hl.bind(mainmod .. " + T", hl.dsp.exec_cmd(terminal))
hl.bind(mainmod .. " + C", hl.dsp.window.close())
hl.bind(mainmod .. " + Escape", hl.dsp.exit())
hl.bind(mainmod .. " + E", hl.dsp.exec_cmd(fileManager))
hl.bind(mainmod .. " + space", hl.dsp.exec_cmd(menu))
--hl.bind(
--	mainmod .. " + F",
--	hl.dsp.window.fullscreen({
--		mode = "maximized",
--		action = "toggle",
--	})
--)
--hl.bind(mainmod .. " + SHIFT + F", hl.dsp.window.fullscreen({ "fullscreen", "toggle" }))
hl.bind(mainmod .. " + Tab", function()
	hl.dsp.window.cycle_next("floating")
	hl.dsp.window.alter_zorder({ mode = "top" })
end)
hl.bind(mainmod .. " + ALT + Delete", hl.dsp.exec_cmd('kitty -e "poweroff"'))
hl.bind(mainmod .. " + ALT + R", hl.dsp.exec_cmd('kitty -e "reboot"'))

-- move focus

hl.bind(mainmod .. " + J", hl.dsp.layout("focus l"))
hl.bind(mainmod .. " + L", hl.dsp.layout("focus r"))
hl.bind(mainmod .. " + N", hl.dsp.window.move({ monitor = "+1" }))
hl.bind(mainmod .. " + K", hl.dsp.focus({ workspace = "m-1" }))
hl.bind(mainmod .. " + I", hl.dsp.focus({ workspace = "m+1" }))
hl.bind(mainmod .. " + Comma", hl.dsp.focus({ monitor = "+1" }))

-- Move/resize windows with mainMod + LMB/RMB and dragging
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })

-- Laptop multimedia keys for volume and LCD brightness
hl.bind(
	"XF86AudioRaiseVolume",
	hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"),
	{ locked = true, repeating = true }
)
hl.bind(
	"XF86AudioLowerVolume",
	hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"),
	{ locked = true, repeating = true }
)
hl.bind(
	"XF86AudioMute",
	hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"),
	{ locked = true, repeating = true }
)
hl.bind(
	"XF86AudioMicMute",
	hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"),
	{ locked = true, repeating = true }
)
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%+"), { locked = true, repeating = true })
hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%-"), { locked = true, repeating = true })

-- Requires playerctl
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true })
hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true })
workspaces.lua
hl.workspace_rule({ workspace = "special:keyring", on_created_empty = "$HOME/.local/bin/keepassxc" })
hl.workspace_rule({ workspace = "special:todo", on_created_empty = 'kitty -e "tdvim"' })
hl.workspace_rule({ workspace = "special:audio", on_created_empty = 'pavucontrol & kitty -e "alsamixer"' })
hl.workspace_rule({ workspace = "special:dashboard", on_created_empty = "$HOME/.local/bin/clock & gnome-calendar" })

-- right
hl.workspace_rule({ workspace = 1, monitor = "DP-1", default = true })
for i = 2, 9 do
	hl.workspace_rule({ workspace = i, monitor = "DP-1" })
end
hl.workspace_rule({ workspace = 99, monitor = "DP-1" })

-- left
hl.workspace_rule({ workspace = 11, monitor = "DP-3", default = true })
for i = 12, 19 do
	hl.workspace_rule({ workspace = i, monitor = "DP-3" })
end
hl.workspace_rule({ workspace = 199, monitor = "DP-3" })


hl.window_rule({
	match = { workspace = 99 },
	float = true,
})

hl.window_rule({
	match = { workspace = 199 },
	float = true,
})

-------------------
--- KEYBINDINGS ---
-------------------

local leader = "SUPER"

hl.bind(leader .. " + Slash", hl.dsp.workspace.toggle_special("keyring"))
hl.bind(leader .. " + Asterisk", hl.dsp.workspace.toggle_special("todo"))
hl.bind(leader .. " + Dollar", hl.dsp.workspace.toggle_special("audio"))
hl.bind(leader .. " + Minus", hl.dsp.workspace.toggle_special("dashboard"))
hl.bind(leader .. " + S", hl.dsp.workspace.toggle_special("magic"))
hl.bind(leader .. " + SHIFT + S", hl.dsp.window.move({ workspace = "special:magic" }))

local right_keys = "JKLUIO"
local left_keys = "SDFQER"

local function do_and_reset(f, i)
	return function()
		f({ workspace = i })
		hl.dsp.submap("reset")
	end
end

local function spatial_keys_template(f)
	return function()
		for i = 1, #right_keys do
			local k = right_keys:sub(i, i)
			hl.bind(leader .. " + " .. k, do_and_reset(f, i))
		end
		hl.bind(leader .. " + Comma", do_and_reset(f, 99))
		for i = 1, #left_keys do
			i = i + 10
			local k = left_keys:sub(i, i)
			hl.bind(leader .. " + " .. k, do_and_reset(f, i))
		end
		hl.bind(leader .. " + V", do_and_reset(f, 199))
		hl.bind("catchall", hl.dsp.submap("reset"))
	end
end

hl.bind(leader .. " + G", hl.dsp.submap("goto"))
hl.define_submap("goto", spatial_keys_template(hl.dsp.focus))

hl.bind(leader .. " + M", hl.dsp.submap("moveto"))
hl.define_submap("goto", spatial_keys_template(hl.dsp.window.move))

Is that really your filename?

Needs to be hyprland.lua rather.

no it’s not, my mind is all mushy that’s all :grinning_face_with_smiling_eyes:

What’s in your config dir?

$ ls -al ~/.config/hypr

What commit are you on?

$ hyprctl version

here you go :

nini@customer:~/.config/hypr$ ls -l
total 36
drwxr-xr-x. 1 nini me    22 Jan 31 23:35 dms
-rw-r--r--. 1 nini me 11835 Apr 29 16:47 hyprland.conf.bak
-rw-r--r--. 1 nini me  5104 Apr 30 21:26 hyprland.lua
-rw-r--r--. 1 nini me   230 Feb 17 08:38 hyprpaper.conf
-rw-r--r--. 1 nini me  3825 Apr 30 13:51 keybindings_vimstyle.conf
-rw-r--r--. 1 nini me  2385 Apr 30 21:31 workspaces.lua


nini@customer:~/.config/hypr$ hyprctl version
Hyprland 0.54.3 built from branch v0.54.3 at commit 521ece463c4a9d3d128670688a34756805a4328f clean (version: bump to 0.54.3).
Date: Fri Mar 27 18:17:50 2026
Tag: v0.54.3, commits: 7014

Libraries:
Hyprgraphics: built against 0.5.1, system has unknown
Hyprutils: built against 0.12.0, system has unknown
Hyprcursor: built against 0.1.13, system has unknown
Hyprlang: built against 0.6.8, system has unknown
Aquamarine: built against 0.11.0, system has unknown

Version ABI string: 521ece463c4a9d3d128670688a34756805a4328f_aq_0.11_hu_0.12_hg_0.5_hc_0.1_hlg_0.6
no flags were set

PS : there’s no hidden files (true dotfiles) in the folder

Lua is only on git main. You’re on the last tagged release. No Lua for you!

Wait for v0.55.0 or build from git.

all right then, thanks pal :)

Now I was wondering… when I tried hyprpm update hyprscrolling failed to build cause it was refering to a non-existant file anymore (IHyprLayout.hpp):

→ Building hyprscrolling
 ━━━━━━━━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━━━━━━━━━━━━━  2 / 4  Updating hyprland-plugins[v] shell returned:  -> cd /run/user/1000/hyprpm/nini && PKG_CONFIG_PATH="/var/cache/hyprpm/nini/headersRoot/share/pkgconfig:$PKG_CONFIG_PATH" make -C hyprscrolling all
make: Entering directory '/run/user/1000/hyprpm/nini/hyprscrolling'
g++ -O2 -shared -fPIC -std=c++2b  --no-gnu-unique main.cpp Scrolling.cpp -o hyprscrolling.so `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon`
In file included from main.cpp:20:
Scrolling.hpp:4:10: fatal error: hyprland/src/layout/IHyprLayout.hpp: No such file or directory
    4 | #include <hyprland/src/layout/IHyprLayout.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from Scrolling.cpp:1:
Scrolling.hpp:4:10: fatal error: hyprland/src/layout/IHyprLayout.hpp: No such file or directory
    4 | #include <hyprland/src/layout/IHyprLayout.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:12: all] Error 1
make: Leaving directory '/run/user/1000/hyprpm/nini/hyprscrolling'



✖ Plugin hyprscrolling failed to build.
  This likely means that the plugin is either outdated, not yet available for your version, or broken.
If you are on -git, update first.
Try re-running with -v to see more verbose output.

would you happen to know how to remove and re-downlad and build hyprscrolling ? I mean without using git and building manually. If not, it’s fine, like I said, I have a workaround.

All right, finally understood the origin of my problems : in 0.54 (and maybe few versions earlier) hyprscrolling is fully built-in.
I’ll go into more details in case anyone else is having similar struggles as I after updating from a version using the plugin hyprscrolling to 0.54 where hyprscrolling has been fully integrated and just somewhat renamed scrolling and is not a plugin anymore

so hyprscrolling was enabled with hyprpm and the config was :

general {
    # ... many parameters here ...
    layout = scrolling
}

plugin {
    hyprscrolling {
        focus_fit_method = 0
        fullscreen_on_one_column = true
        column_width = 1.0
    }
}

if this was what you got, here is what you need to do :

  1. disable hyprscrolling with hyprpm disable hyprscrolling
  2. change the old config section to the following structure :
general {
    layout = scrolling
}

scrolling {
    focus_fit_method = 0
    fullscreen_on_one_column = true
    column_width = 1.0
}

PS : if you ever use the same config as I, use monocle instead of scrolling.

Bro the hyprscroll is outdated it’s a build in feature Since 0.54, you can use it like this

workspace = 10, layout:scrolling

yeah, as I mentioned, I ended up figuring it out :slight_smile:
I just found the news page :sweat_smile:, now I know

thanks bro :clinking_beer_mugs: