yazi only with hotkey

This commit is contained in:
Lennart J. Kurzweg (Nx2)
2024-09-27 21:42:29 +02:00
parent 5a40c8e1f9
commit f422551ac3
4 changed files with 72 additions and 48 deletions

View File

@@ -91,12 +91,15 @@ lib.mkIf (user != "tv")
if not set -q IN_NIX_SHELL
nxfetch
# yazi
set tmp (mktemp -t "yazi-cwd.XXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
if set -q SESSION_FROM_DE
set -e SESSION_FROM_DE
set tmp (mktemp -t "yazi-cwd.XXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
cd -- "$cwd"
end
rm -f -- "$tmp"
end
rm -f -- "$tmp"
end
'';
functions = {