From 495a48b879735cdb3412a864447484c5ba4180de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emre=20AKY=C3=9CZ?= Date: Sat, 1 Jul 2023 03:54:06 +0300 Subject: [PATCH] Another fix for sxiv | slideshow --- .config/lf/lfrc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index f43fae6d..2a626687 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -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