From 5ec6f7d636bb3f7a38fb1c54e761f66c4f3ec7d7 Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Wed, 26 Aug 2026 14:14:07 +0200 Subject: [PATCH] hyprland: Fix mouse binds, hl.bindm does not exist Hyprland's lua API only registers hl.bind; there is no separate hl.bindm. The settings.bindm key rendered as a literal hl.bindm(...) call, which errored with "attempt to call a nil value" at runtime. Fold the mouse binds into settings.bind with { mouse = true }, per the wiki's own example config. --- hosts/pinwheel/modules/hyprland/default.nix | 35 ++++++++++----------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/hosts/pinwheel/modules/hyprland/default.nix b/hosts/pinwheel/modules/hyprland/default.nix index 2df46c5..532d971 100644 --- a/hosts/pinwheel/modules/hyprland/default.nix +++ b/hosts/pinwheel/modules/hyprland/default.nix @@ -386,25 +386,24 @@ in (lib.generators.mkLuaInline ''hl.dsp.exec_cmd("${magnifier} --reset")'') ]; } - ]; - bindm = [ - # mouse movements - { - _args = [ - "${mod} + mouse:272" # left click - (lib.generators.mkLuaInline "hl.dsp.window.drag()") - { mouse = true; } - ]; - } - { - _args = [ - "${mod} + mouse:273" # right click - (lib.generators.mkLuaInline "hl.dsp.window.resize()") - { mouse = true; } - ]; - } - ]; + # mouse movements: hyprland's lua API has no separate `bindm`, + # mouse binds are plain `hl.bind` with `{ mouse = true }`. + { + _args = [ + "${mod} + mouse:272" # left click + (lib.generators.mkLuaInline "hl.dsp.window.drag()") + { mouse = true; } + ]; + } + { + _args = [ + "${mod} + mouse:273" # right click + (lib.generators.mkLuaInline "hl.dsp.window.resize()") + { mouse = true; } + ]; + } + ]; }; };