From 7f78e2d1c6a9db76444e02a73f0669ebb79f8833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=A9tan=20Lepage?= <33058747+GaetanLepage@users.noreply.github.com> Date: Sun, 1 Dec 2024 18:47:01 +0100 Subject: [PATCH] yazi: update keymap config --- modules/programs/yazi.nix | 18 ++++++------ .../programs/yazi/keymap-expected.toml | 28 +++++++++---------- tests/modules/programs/yazi/settings.nix | 18 ++++++------ 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/modules/programs/yazi.nix b/modules/programs/yazi.nix index 0f5117dbd..9c47345f5 100644 --- a/modules/programs/yazi.nix +++ b/modules/programs/yazi.nix @@ -77,16 +77,16 @@ in { default = { }; example = literalExpression '' { - input.keymap = [ - { exec = "close"; on = [ "" ]; } - { exec = "close --submit"; on = [ "" ]; } - { exec = "escape"; on = [ "" ]; } - { exec = "backspace"; on = [ "" ]; } + input.prepend_keymap = [ + { run = "close"; on = [ "" ]; } + { run = "close --submit"; on = [ "" ]; } + { run = "escape"; on = [ "" ]; } + { run = "backspace"; on = [ "" ]; } ]; - manager.keymap = [ - { exec = "escape"; on = [ "" ]; } - { exec = "quit"; on = [ "q" ]; } - { exec = "close"; on = [ "" ]; } + manager.prepend_keymap = [ + { run = "escape"; on = [ "" ]; } + { run = "quit"; on = [ "q" ]; } + { run = "close"; on = [ "" ]; } ]; } ''; diff --git a/tests/modules/programs/yazi/keymap-expected.toml b/tests/modules/programs/yazi/keymap-expected.toml index 6733978ad..09f300086 100644 --- a/tests/modules/programs/yazi/keymap-expected.toml +++ b/tests/modules/programs/yazi/keymap-expected.toml @@ -1,27 +1,27 @@ -[[input.keymap]] -exec = "close" +[[input.prepend_keymap]] on = [""] +run = "close" -[[input.keymap]] -exec = "close --submit" +[[input.prepend_keymap]] on = [""] +run = "close --submit" -[[input.keymap]] -exec = "escape" +[[input.prepend_keymap]] on = [""] +run = "escape" -[[input.keymap]] -exec = "backspace" +[[input.prepend_keymap]] on = [""] +run = "backspace" -[[manager.keymap]] -exec = "escape" +[[manager.prepend_keymap]] on = [""] +run = "escape" -[[manager.keymap]] -exec = "quit" +[[manager.prepend_keymap]] on = ["q"] +run = "quit" -[[manager.keymap]] -exec = "close" +[[manager.prepend_keymap]] on = [""] +run = "close" diff --git a/tests/modules/programs/yazi/settings.nix b/tests/modules/programs/yazi/settings.nix index 2694dadec..8c44870af 100644 --- a/tests/modules/programs/yazi/settings.nix +++ b/tests/modules/programs/yazi/settings.nix @@ -5,35 +5,35 @@ enable = true; keymap = { - input.keymap = [ + input.prepend_keymap = [ { - exec = "close"; + run = "close"; on = [ "" ]; } { - exec = "close --submit"; + run = "close --submit"; on = [ "" ]; } { - exec = "escape"; + run = "escape"; on = [ "" ]; } { - exec = "backspace"; + run = "backspace"; on = [ "" ]; } ]; - manager.keymap = [ + manager.prepend_keymap = [ { - exec = "escape"; + run = "escape"; on = [ "" ]; } { - exec = "quit"; + run = "quit"; on = [ "q" ]; } { - exec = "close"; + run = "close"; on = [ "" ]; } ];