From abd08877787c9d32b604f08071e9adc3e3060139 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 30 Oct 2026 19:53:56 +0100 Subject: Add desktop entry and install instructions Icon comes from the theme (zoom-in), and the entry registers for common image types so file managers offer it under Open with. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 6 ++++++ README.md | 10 ++++++++++ upscale-qt.desktop | 12 ++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 upscale-qt.desktop diff --git a/AGENTS.md b/AGENTS.md index 2f270ce..40f6273 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,6 +12,12 @@ description per model from an optional `models.txt` in the upscalers folder. The only Python dependency is PyQt6; everything else is stdlib plus `sd-cli`. Keep it a single file and do not add dependencies. +On the maintainer's machine the script and menu entry are symlinks into +the repo, so edits are live on the next launch: + + ~/bin/upscale-qt -> upscale-qt + ~/.local/share/applications/upscale-qt.desktop -> upscale-qt.desktop + Design spec: `docs/superpowers/specs/2026-10-30-upscale-qt-design.md`. ## External tools diff --git a/README.md b/README.md index 81f322f..26c3cd3 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,16 @@ Small PyQt6 app to upscale an image with an ESRGAN model through `sd-cli` (stabl - PyQt6 - `sd-cli` from stable-diffusion.cpp, plus one or more ESRGAN upscaler models in a folder +## Install + +Symlink the script and menu entry into your home directory, so later updates of the repo apply without reinstalling (`~/bin` must be on `PATH`): + + ln -s "$PWD/upscale-qt" ~/bin/upscale-qt + 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. + ## Usage ./upscale-qt [image] diff --git a/upscale-qt.desktop b/upscale-qt.desktop new file mode 100644 index 0000000..296ed67 --- /dev/null +++ b/upscale-qt.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Application +Name=upscale-qt +GenericName=Image Upscaler +Comment=Upscale an image with sd-cli and compare before and after +Exec=upscale-qt %f +Icon=zoom-in +Terminal=false +Categories=Graphics;Qt; +MimeType=image/png;image/jpeg;image/webp;image/bmp;image/tiff; +Keywords=upscale;esrgan;image;photo; +StartupWMClass=upscale-qt -- cgit v1.2.3