mirror of
https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles.git
synced 2025-09-15 09:45:58 +03:00

changelog: - refactored fzf scripts - nullify unused\remapped fzf bindings - `list-op.fish` hotfix 3 - added `hexyl` package to the system
21 lines
486 B
Fish
21 lines
486 B
Fish
function switch-preview
|
|
set path "$argv[1]"
|
|
|
|
if test -f "$path"
|
|
if test ! -s "$path"
|
|
echo "File is empty"
|
|
else
|
|
archive-preview "$path"
|
|
if string match -q "image/*" (file -b --mime-type "$path")
|
|
image-preview "$path"
|
|
else
|
|
file-preview "$path"
|
|
end
|
|
end
|
|
else if test -d "$path"
|
|
dir-preview "$path"
|
|
else
|
|
echo "Preview unavailable"
|
|
end
|
|
end
|