From 8d87ef1e2154adf1c1fe8d4bbb3cc8743fc7fb17 Mon Sep 17 00:00:00 2001
From: Rouven Seifert <rouven@rfive.de>
Date: Sat, 10 May 2025 00:56:22 +0200
Subject: [PATCH] fix zsh-vi-mode escape time

---
 overlays/default.nix | 8 ++++++++
 shared/zsh.nix       | 3 ++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/overlays/default.nix b/overlays/default.nix
index 3679a03..51143f3 100644
--- a/overlays/default.nix
+++ b/overlays/default.nix
@@ -12,6 +12,14 @@ in
       rm $out/share/applications/pcmanfm-desktop-pref.desktop
     '';
   });
+  zsh-vi-mode = prev.zsh-vi-mode.overrideAttrs (_: {
+    patches = [
+      (fetchpatch {
+        url = "https://patch-diff.githubusercontent.com/raw/jeffreytse/zsh-vi-mode/pull/308.patch";
+        hash = "sha256-8NUQ9mtf20TSKlfvhTZQSC0xcB27pdSZoGE/seuZOiw=";
+      })
+    ];
+  });
   pww = callPackage ../pkgs/pww { };
   ianny = callPackage ../pkgs/ianny { };
 
diff --git a/shared/zsh.nix b/shared/zsh.nix
index 3fa3fff..2187358 100644
--- a/shared/zsh.nix
+++ b/shared/zsh.nix
@@ -67,12 +67,13 @@ in
           export MCFLY_RESULTS=30
           export MCFLY_INTERFACE_VIEW=BOTTOM
           export MCFLY_PROMPT="❯"
+          export ZVM_FAST_ESCAPE=true
           # fix for networkctl
           zstyle ':completion:*:complete:networkctl:*' list-grouped true
           source ${pkgs.agdsn-zsh-config}/etc/zsh/zshrc
           source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh
           source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
-          zvm_after_init_commands+=(eval "$(atuin init zsh)")
+          zvm_after_init_commands+=(eval "$(atuin init zsh --disable-up-arrow)")
           unsetopt extendedglob