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 <david@hey.com>
This commit is contained in:
Bogdan Tanase
2025-09-14 16:51:24 +02:00
committed by GitHub
parent a77264ae99
commit 55bf2457d4
2 changed files with 5 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
[Desktop Entry] [Desktop Entry]
Name=Image Viewer Name=Image Viewer
Exec=imv %F Exec=sh -c 'imv -n "$1" "$(dirname "$1")"' sh %f
Icon=imv Icon=imv
Type=Application 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; 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;

4
migrations/1757273064.sh Normal file
View File

@@ -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"