From 01ba89b3a844cea9c0d40ebb93bd7d134991eeda Mon Sep 17 00:00:00 2001 From: dkorbelainen Date: Tue, 27 Jan 2026 14:11:50 +0300 Subject: [PATCH] feat: add post-install instructions for keyboard shortcut setup - Add sniptext.install with clear setup instructions - Display recommended keybind (Ctrl+Alt+T) after installation - Include examples for Hyprland, Sway, i3, GNOME, and KDE - Update PKGBUILD to reference install script --- .SRCINFO | 1 + PKGBUILD | 1 + sniptext.install | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 sniptext.install diff --git a/.SRCINFO b/.SRCINFO index b2ac16d9d0a7..1aee3478e053 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -3,6 +3,7 @@ pkgbase = sniptext pkgver = 0.1.1 pkgrel = 1 url = https://github.com/dkorbelainen/sniptext + install = sniptext.install arch = any license = MIT makedepends = python-build diff --git a/PKGBUILD b/PKGBUILD index 5a1cd6ed4e81..d386ac446329 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -6,6 +6,7 @@ pkgdesc="Screen capture OCR tool with adaptive ensemble recognition" arch=('any') url="https://github.com/dkorbelainen/sniptext" license=('MIT') +install=sniptext.install depends=( 'python' 'python-numpy' diff --git a/sniptext.install b/sniptext.install new file mode 100644 index 000000000000..277e347039a2 --- /dev/null +++ b/sniptext.install @@ -0,0 +1,32 @@ +post_install() { + echo "" + echo "========================================================================" + echo " SnipText OCR - Installation Complete" + echo "========================================================================" + echo "" + echo " REQUIRED: Configure a keyboard shortcut to use SnipText!" + echo "" + echo " Recommended keybind: Ctrl+Alt+T" + echo " Command to run: sniptext --capture-now" + echo "" + echo " Configuration examples:" + echo "" + echo " Hyprland (~/.config/hypr/hyprland.conf):" + echo " bind = CTRL ALT, T, exec, sniptext --capture-now" + echo "" + echo " Sway/i3 (~/.config/sway/config or ~/.config/i3/config):" + echo " bindsym Ctrl+Alt+t exec sniptext --capture-now" + echo "" + echo " GNOME: Settings → Keyboard → Custom Shortcuts" + echo " KDE: System Settings → Shortcuts → Custom Shortcuts" + echo "" + echo " Test from terminal: sniptext --capture-now" + echo " Documentation: /usr/share/doc/sniptext/README.md" + echo "" + echo "========================================================================" + echo "" +} + +post_upgrade() { + post_install +}