From cb9928618976a2558a43a4bd065bded9653a2414 Mon Sep 17 00:00:00 2001 From: Pei Yang Ching <59727193+horriblename@users.noreply.github.com> Date: Sat, 24 Aug 2024 12:40:54 +0200 Subject: [PATCH] lib.binds: update lzn util functions --- lib/binds.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/binds.nix b/lib/binds.nix index f8f915e..ca187f2 100644 --- a/lib/binds.nix +++ b/lib/binds.nix @@ -3,7 +3,6 @@ inherit (lib.modules) mkIf mkDefault; inherit (lib.types) nullOr str; inherit (lib.attrsets) isAttrs mapAttrs; - inherit (lib.generators) mkLuaInline; binds = rec { mkLuaBinding = key: action: desc: @@ -69,19 +68,20 @@ pushDownDefault = attr: mapAttrs (_: mkDefault) attr; - mkLznBinding = mode: lhs: rhs: desc: { - inherit mode lhs rhs desc; + mkLznBinding = mode: key: action: desc: { + inherit mode desc key action; }; mkSetLznBinding = binding: action: { - lhs = binding.value; - rhs = action; + inherit action; + key = binding.value; desc = binding.description; }; mkSetLuaLznBinding = binding: action: { - lhs = binding.value; - rhs = mkLuaInline "function() ${action} end"; + inherit action; + key = binding.value; + lua = true; desc = binding.description; }; };