From 823141fdb16cf7b61e458b4d093ba1a05f29d0aa Mon Sep 17 00:00:00 2001
From: Luca Bilke <bilke@tralios.de>
Date: Thu, 1 Feb 2024 10:25:26 +0100
Subject: [PATCH] fix lf new terminal function

---
 .config/lf/lfrc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.config/lf/lfrc b/.config/lf/lfrc
index e680d94b..760facca 100644
--- a/.config/lf/lfrc
+++ b/.config/lf/lfrc
@@ -204,7 +204,7 @@ cmd set_previewer %{{
 
 # HACK: This is a dirty hack to have an lf terminal that I can "exit" out of into a shell
 cmd new_lf_term &{{
-    mapcmd='map q $tmux'
+    mapcmd='map q $sh -c "tmux; kill $id"'
     previewercmd="set_previewer $(basename "$lf_previewer")"
     $TERMINAL -e lf -command "${previewercmd}; ${mapcmd}"
 }}