Allow kitty to preview images when using ff
This commit is contained in:
+10
-1
@@ -6,7 +6,16 @@ if command -v eza &> /dev/null; then
|
|||||||
alias lta='lt -a'
|
alias lta='lt -a'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
alias ff="fzf --preview 'bat --style=numbers --color=always {}'"
|
if [[ "$TERM" == "xterm-kitty" ]]; then
|
||||||
|
alias ff="fzf --preview '
|
||||||
|
case \$(file --mime-type -b {}) in
|
||||||
|
image/*) kitty icat --clear --transfer-mode=memory --stdin=no --place=\${FZF_PREVIEW_COLUMNS}x\${FZF_PREVIEW_LINES}@0x0 {} ;;
|
||||||
|
*) bat --style=numbers --color=always {} ;;
|
||||||
|
esac
|
||||||
|
'"
|
||||||
|
else
|
||||||
|
alias ff="fzf --preview 'bat --style=numbers --color=always {}'"
|
||||||
|
fi
|
||||||
alias eff='$EDITOR "$(ff)"'
|
alias eff='$EDITOR "$(ff)"'
|
||||||
|
|
||||||
if command -v zoxide &> /dev/null; then
|
if command -v zoxide &> /dev/null; then
|
||||||
|
|||||||
Reference in New Issue
Block a user