From 34d0a4deb297c3306e447546c5af291db3a6c8ef Mon Sep 17 00:00:00 2001 From: dkorbelainen Date: Tue, 27 Jan 2026 15:25:44 +0300 Subject: [PATCH] fix: improve post-install message and update instructions - Update symspellpy installation instruction to use yay instead of pip - Improve visual structure with clear sections --- PKGBUILD | 2 +- sniptext.install | 102 ++++++++++++++++++++++++++--------------------- 2 files changed, 57 insertions(+), 47 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 3b896bf50d16..aa6a65261648 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -35,7 +35,7 @@ optdepends=( 'xclip: X11 clipboard support' 'imagemagick: X11 screenshot tool (import command)' ) -# Note: For enhanced spell correction, install: pip install --user symspellpy +# Note: For enhanced spell correction, install: yay -S python-symspellpy makedepends=('python-build' 'python-installer' 'python-wheel') source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") sha256sums=('5cd0fe35e186405e24aad46d9ba33c7783b222d4f83b1a6400f2a36e057d66d9') diff --git a/sniptext.install b/sniptext.install index 1f772eb27973..16a0530287d1 100644 --- a/sniptext.install +++ b/sniptext.install @@ -1,50 +1,60 @@ 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 "========================================================================" - echo " IMPORTANT: Install screenshot tools for your display server!" - echo "========================================================================" - echo "" - echo " For Wayland (Hyprland, Sway, etc):" - echo " sudo pacman -S slurp grim wl-clipboard" - echo "" - echo " For X11 (i3, bspwm, etc):" - echo " sudo pacman -S maim xclip" - echo "" - echo "========================================================================" - echo " OPTIONAL: Enhanced text correction (recommended)" - echo "========================================================================" - echo "" - echo " For better OCR error correction, install:" - echo " pip install --user symspellpy" - echo "" - echo " This enables dictionary-based spell checking for OCR output." - echo " Basic correction works without it, but enhanced is better." - echo "" - echo " Test from terminal: sniptext --capture-now" - echo " Documentation: /usr/share/doc/sniptext/README.md" - echo "" - echo "========================================================================" - echo "" + cat << 'EOF' + +╔══════════════════════════════════════════════════════════════════════════╗ +║ SnipText OCR - Installation Complete ║ +╚══════════════════════════════════════════════════════════════════════════╝ + +[!] STEP 1: Configure keyboard shortcut (REQUIRED!) +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + Recommended keybind: Ctrl+Alt+T + Command to run: sniptext --capture-now + + Configuration examples: + + Hyprland (~/.config/hypr/hyprland.conf): + bind = CTRL ALT, T, exec, sniptext --capture-now + + Sway/i3 (~/.config/sway/config or ~/.config/i3/config): + bindsym Ctrl+Alt+t exec sniptext --capture-now + + GNOME: Settings -> Keyboard -> Custom Shortcuts + KDE: System Settings -> Shortcuts -> Custom Shortcuts + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +[!] STEP 2: Install screenshot tools (REQUIRED!) +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + For Wayland (Hyprland, Sway, etc): + sudo pacman -S slurp grim wl-clipboard + + For X11 (i3, bspwm, etc): + sudo pacman -S maim xclip + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +[*] OPTIONAL: Enhanced text correction (recommended) +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + For better OCR error correction: + yay -S python-symspellpy + + * Dictionary-based spell checking for OCR output + * Basic correction works without it, but this makes it better! + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +Test it! +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + Test from terminal: + sniptext --capture-now + + Documentation: + /usr/share/doc/sniptext/README.md + +╚══════════════════════════════════════════════════════════════════════════╝ + +EOF } post_upgrade() {