From 3e38d067fd853e4884530169456eb9b489c2705b Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 30 Oct 2026 19:55:29 +0100 Subject: Add file manager right-click action Freedesktop file-manager action for pcmanfm-qt and similar, shown for a single selected image. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 5 +++++ README.md | 8 +++++++- upscale-qt-action.desktop | 14 ++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 upscale-qt-action.desktop diff --git a/AGENTS.md b/AGENTS.md index 40f6273..5174724 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -17,6 +17,11 @@ the repo, so edits are live on the next launch: ~/bin/upscale-qt -> upscale-qt ~/.local/share/applications/upscale-qt.desktop -> upscale-qt.desktop + ~/.local/share/file-manager/actions/upscale-qt.desktop -> upscale-qt-action.desktop + +The last one is the pcmanfm-qt right-click action (freedesktop +file-manager actions format, single selection only since the app opens one +image). Design spec: `docs/superpowers/specs/2026-10-30-upscale-qt-design.md`. diff --git a/README.md b/README.md index 26c3cd3..0565b34 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,13 @@ Symlink the script and menu entry into your home directory, so later updates of ln -s "$PWD/upscale-qt.desktop" ~/.local/share/applications/upscale-qt.desktop update-desktop-database ~/.local/share/applications -The menu entry uses the `zoom-in` icon from your icon theme and registers for common image types, so "Open with" works from a file manager. To uninstall, remove the two symlinks. +The menu entry uses the `zoom-in` icon from your icon theme and registers for common image types, so "Open with" works from a file manager. + +For a right-click "Upscale with upscale-qt" item in file managers that read freedesktop file-manager actions (pcmanfm-qt, Caja, Nemo), with exactly one image selected: + + ln -s "$PWD/upscale-qt-action.desktop" ~/.local/share/file-manager/actions/upscale-qt.desktop + +To uninstall, remove the symlinks. ## Usage diff --git a/upscale-qt-action.desktop b/upscale-qt-action.desktop new file mode 100644 index 0000000..4986f67 --- /dev/null +++ b/upscale-qt-action.desktop @@ -0,0 +1,14 @@ +[Desktop Entry] +Type=Action + +Name=Upscale with upscale-qt +Name[it]=Ingrandisci con upscale-qt + +Icon=zoom-in +Profiles=profile-zero; + +[X-Action-Profile profile-zero] +MimeTypes=image/png;image/jpeg;image/webp;image/bmp;image/tiff; +SelectionCount==1 +Exec=upscale-qt %f +Name=Default profile -- cgit v1.2.3