From 55bf2457d41067b31e7c54f264ca300afdf66660 Mon Sep 17 00:00:00 2001 From: Bogdan Tanase Date: Sun, 14 Sep 2025 16:51:24 +0200 Subject: [PATCH] Feed the image folder to the Image Viewer so the next/previous image navigation works (#1444) * Feed the image folder to the Image Viewer so the next/previous image navigation works When double clicking an image in Nautilus, my expectation is that I can navigate to the other images in the folder with the arrow keys. This doesn't happen currently because the imv command receives only the filename as a parameter. However, if we use: `imv -n /myfolder/image.jpg /myfolder` works becasue we're opening the folder starting at the image given by the -n parameter. * add migration for imv.desktop update * Simplify migration --------- Co-authored-by: David Heinemeier Hansson --- applications/imv.desktop | 2 +- migrations/1757273064.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 migrations/1757273064.sh diff --git a/applications/imv.desktop b/applications/imv.desktop index 293afc8f..d6c2dcd8 100644 --- a/applications/imv.desktop +++ b/applications/imv.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Name=Image Viewer -Exec=imv %F +Exec=sh -c 'imv -n "$1" "$(dirname "$1")"' sh %f Icon=imv Type=Application MimeType=image/png;image/jpeg;image/jpg;image/gif;image/bmp;image/webp;image/tiff;image/x-xcf;image/x-portable-pixmap;image/x-xbitmap; diff --git a/migrations/1757273064.sh b/migrations/1757273064.sh new file mode 100644 index 00000000..d9664d99 --- /dev/null +++ b/migrations/1757273064.sh @@ -0,0 +1,4 @@ +echo "Allow Image Viewer to see all images in directory and use arrow keys to navigate" + +cp -f "$HOME/.local/share/omarchy/applications/imv.desktop" "$HOME/.local/share/applications/imv.desktop" +