Another fix for sxiv | slideshow

This commit is contained in:
Emre AKYÜZ 2023-07-01 03:54:06 +03:00 committed by GitHub
parent a8e31d6a1d
commit 495a48b879
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,6 +34,10 @@ cmd open ${{
text/*|application/json|inode/x-empty|application/x-subrip) $EDITOR $fx;;
image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;;
image/svg+xml) display -- $f ;;
image/*) bash -c '
shopt -s nullglob
dir="$0"
selected_file="$1"
image/*) bash -c '
shopt -s nullglob
dir="$0"
@ -44,8 +48,7 @@ cmd open ${{
done
for ((i=0; i<${#images[@]}; i++)); do
[[ "${images[i]}" = "$selected_file" ]] && {
images=( "${images[@]:i}" "${images[@]:0:i}" )
sxiv -abfio "${images[@]}"
sxiv -nabfio "$((i + 1))" "${images[@]}"
break
}
done