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
This commit is contained in:
dkorbelainen 2026-01-27 14:11:50 +03:00
parent ce627c8013
commit 01ba89b3a8
3 changed files with 34 additions and 0 deletions

View file

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

View file

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

32
sniptext.install Normal file
View file

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