aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/home/.config/zsh/.zshrc
diff options
context:
space:
mode:
Diffstat (limited to 'home/.config/zsh/.zshrc')
-rw-r--r--home/.config/zsh/.zshrc8
1 files changed, 6 insertions, 2 deletions
diff --git a/home/.config/zsh/.zshrc b/home/.config/zsh/.zshrc
index bd03e8b..a7d24db 100644
--- a/home/.config/zsh/.zshrc
+++ b/home/.config/zsh/.zshrc
@@ -221,10 +221,14 @@ alias sysu='systemctl --user'
# Navigation
alias c='clear'
-# Yazi: cd-on-exit wrapper
+# Yazi: cd-on-exit wrapper (force ueberzug++ inside zellij for image previews)
y() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
- command yazi "$@" --cwd-file="$tmp"
+ if [[ -n "$ZELLIJ" ]]; then
+ TERM=xterm-kitty command yazi "$@" --cwd-file="$tmp"
+ else
+ command yazi "$@" --cwd-file="$tmp"
+ fi
IFS= read -r -d '' cwd < "$tmp"
[[ "$cwd" != "$PWD" ]] && [[ -d "$cwd" ]] && builtin cd -- "$cwd"
rm -f -- "$tmp"